Questions tagged [cortex-m3]

For questions specifically for the Cortex-M3. Strongly consider the [cortex-m] tag instead or the [thumb] tag for Thumb/Thumb2 questions.

Please use instead of this tag. See: Merge ARM tags.

For questions specifically for the Cortex-M3. Use the tag for Thumb/Thumb2 question and the tag for general Cortex-M questions. is almost always appropriate as new Cortex-M cores may share features with the Cortex-M3. For general ARM questions please use the tag.

More information is available on the Cortex-M Wikipedia article.

432 questions
55
votes
4 answers

arm gcc toolchain as arm-elf or arm-none-eabi, what is the difference?

When you build a gcc toolchain there is the possibility to build it as arm-elf or as arm-none-eabi, but what is the difference? I use the eabi today, but that is just since everyone else seem to do that... but since that is a really bad argument,…
Johan
  • 18,177
  • 25
  • 89
  • 107
22
votes
2 answers

how to use llvm+clang to compile for stm32

Has someone infos how to build a llvm+clang toolchain using binutils and newlib and how to use it? host: Linux, AMD64 target: cortex-m3, stm32 c-lib: newlib assembler: gnu as
wermut
19
votes
8 answers

STM32 WWDG interrupt firing when not configured

I have an application that I am porting from the Keil IDE to build with the GNU toolchain due to license issues. I have successfully be able to set up, build, flash and run the application on the device. The application on the GNU side is for some…
gettingSmarter
  • 591
  • 1
  • 4
  • 14
18
votes
4 answers

Safely detect, if function is called from an ISR?

I'm developing software for an ARM Cortex M3 (NXP LPC1769) microncontroller. At the moment I'm searching for a mechansim to detect if my function is called within an ISR. I asume that I have to check a register. Based on this information I would…
ferraith
  • 759
  • 6
  • 18
17
votes
1 answer

Using newlib's malloc in an ARM Cortex-M3

I'm creating code for an ARM Cortex-M3 (NXP's LCP17xx). I've been using static memory up to now and everything worked well. I tried to add dynamic memory support, but once I call malloc, the system gets stuck. I'm compiling with gcc for arm bare…
Marga Manterola
  • 622
  • 1
  • 4
  • 12
16
votes
5 answers

How does the in-application programming for ARM (Cortex M3) work?

I'm working on a custom Cortex-M3-based device and I need to implement in-application programming (IAP) mechanism so that it will be possible to update the device firmware without JTAG (we'll use TFTP or HTTP instead). While the IAP-related code…
Roman Dmitrienko
  • 2,725
  • 2
  • 31
  • 44
15
votes
5 answers

Cycle counter on ARM Cortex M4 (or M3)?

I'm trying to profile a C function (which is called from an interrupt, but I can extract it and profile it elsewhere) on a Cortex M4. What are the possibilities to count the number of cycles typically used in this function ? Function shall run in…
makapuf
  • 1,330
  • 1
  • 13
  • 23
13
votes
3 answers

ARM M4 Instructions per Cycle (IPC) counters

I would like to count the number of Instructions per Cycle executed on an ARM cortex-M4 (or cortex-M3) processor. What it's needed is: number of instructions (executed at runtime) of the code I want to profile and number of cycles that the code…
FrankPak
  • 349
  • 3
  • 19
12
votes
6 answers

How do I debug unexpected resets in a STM32 device?

I'm doing some development in C with a STM32F107 chip and, at some point, the device began to reset when I call a specific function. I don't have a debugger and my debugging is just plain text over a serial port. I've used some other…
ivarec
  • 2,414
  • 2
  • 28
  • 50
12
votes
4 answers

How can I determine appropriate stack and heap sizes for ARM Cortex, using C++

The cortex M3 processor startup file allows you to specify the amount of RAM dedicated to the stack and the heap. For a c++ code base, is there a general rule of thumb or perhaps some more explicit way to determine the values for the stack and heap…
rmaVT
  • 125
  • 1
  • 1
  • 8
12
votes
3 answers

linking arbitrary data using GCC ARM toolchain

I want to link in raw binary data. I'd like to either put it at a particular address, or have it link to a symbol (char* mydata, for instance) I have defined in code. Since it's not an obj file, I can't simply link it in. A similar post (Include…
Brian
  • 6,211
  • 6
  • 37
  • 74
11
votes
2 answers

Does anybody know any very basic stm32 tutorials?

Recently I've started on a project which requires a Cortex M3 processor. I have some previous experience with 8bit AVR microcontrollers, so I was hoping for a not to big transition. So I've bought a STM32L-Discovery kit (since low power is an…
luc
  • 111
  • 1
  • 1
  • 3
11
votes
4 answers

How do I run linux on an ARM Cortex M3 board?

I have a Luminary LM3s8962 ARM Cortex M3 development board, and while I've been able to program for it using the Keil RTOS, I'd much prefer to develop on top of linux and an embedded libc. What I would like to know is how can I actually get a linux…
wooster
  • 111
  • 1
  • 1
  • 3
10
votes
4 answers

GCC alias to function outside of translation unit -AKA- is this even the right tool for the job?

I'm working with FreeRTOS on an STM32 (Cortex-M3), and using the CMSIS library from ST to bootstrap everything. The CMSIS library defines the weak symbol SVC_Handler in the startup ".s" file. It must be overridden somewhere in order to get your…
Brian McFarland
  • 7,847
  • 4
  • 32
  • 56
10
votes
4 answers

Difference between .equ and .word in ARM Assembly?

I am curious - What is the difference between .equ and .word directives in ARM assembly, when defining constants?
jhtong
  • 1,349
  • 4
  • 18
  • 31
1
2 3
28 29