Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [cortex-m]

For all ARM Cortex-M series cores, including M0, M0+, M1, M3, M4, M7, M23 and M33.

cortex-m
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 ...
Johan's user avatar
  • 20.5k
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-...
mucka's user avatar
  • 1,317
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 ...
Peter123's user avatar
  • 567
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
user avatar
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 ...
gettingSmarter's user avatar
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 ...
ferraith's user avatar
  • 929
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 ...
makapuf's user avatar
  • 1,390
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 ...
Marga Manterola's user avatar
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?
jhtong's user avatar
  • 1,589
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 ...
dromtrund's user avatar
  • 245
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 ...
Roman Dmitrienko's user avatar
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: ...
K.Mulier's user avatar
  • 8,809
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 ...
Fabio Angeletti's user avatar
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 ...
Bart's user avatar
  • 1,510
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 ...
Brian McFarland's user avatar

15 30 50 per page
1
2 3 4 5
95