Questions tagged [cortex-m]
For all ARM Cortex-M series cores, including M0, M0+, M1, M3, M4, M7, M23 and M33.
cortex-m
1,422
questions
72
votes
4
answers
70k
views
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 ...
39
votes
3
answers
26k
views
How to create a QEMU ARM machine with custom peripherals and memory maps?
I am writing a code for Cortex-M3 cpu and I am performing unit testing using qemu-arm binary. For now everything works just fine. But I am wondering If I am able to test whole system using qemu-system-...
29
votes
12
answers
20k
views
Generate sine signal in C without using the standard function
I want to generate a sine signal in C without using the standard function sin() in order to trigger sine shaped changes in the brightness of a LED. My basic idea was to use a lookup table with 40 ...
25
votes
2
answers
24k
views
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
24
votes
9
answers
21k
views
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 ...
23
votes
4
answers
11k
views
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 ...
19
votes
5
answers
42k
views
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 ...
18
votes
1
answer
17k
views
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 ...
17
votes
4
answers
41k
views
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?
17
votes
3
answers
3k
views
Fastest way to work with unaligned data on a word-aligned processor?
I'm doing a project on an ARM Cortex M0, which does not support unaligned(by 4bytes) access, and I'm trying to optimize the speed of operations on unaligned data.
I'm storing Bluetooth Low Energy ...
16
votes
5
answers
8k
views
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 ...
16
votes
2
answers
13k
views
STM32 internal clocks
I am confused with the clock system on my STM32F7 device (Cortex-M7 microcontroller from STMicroelectronics). The reference manual does not clarify the differences between these clocks sufficiently:
...
15
votes
3
answers
10k
views
ARM Cortex-M compiler differences
I'm about to develop some firmwares for Cortex-M cores on STM32 processors using C for my projects, and searching on the web I've found a lot of different compilers:
Keil, IAR, Linaro, Yagarto and GNU ...
15
votes
5
answers
2k
views
Dynamic memory allocation in STD
Working a lot with microcontrollers and C++ it is important for me to know that I do not perform dynamic memory allocations. However I would like to get the most out of the STD lib. What would be the ...
14
votes
4
answers
6k
views
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 ...