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
10
votes
1 answer

zeromq on embedded cortexM3 platform

Does anyone have already implemented zeroMQ as reliable message solution on cortexM3 nodes? I'm trying to understand if it is possible and to have a memory footprint idea of this. I will have freeRTOS OS maybe. Thanks for ideas and…
user3162481
  • 103
  • 1
  • 4
9
votes
3 answers

Compile for ARM Cortex M3 using standard GCC?

Is it possible to compile C/C++ code for the ARM Cortex M3 (LPC1768) using vanilla GCC with the --target switch, or will I need to compile GCC, binutils, etc to do this?
Bojangles
  • 91,543
  • 47
  • 160
  • 197
9
votes
4 answers

Programmatically cause Undefined Instruction exception

I want to cause an ARM Cortex-M3 Undefined Instruction exception for the test of my test fixture. The IAR compiler supports this with inline assembly like this: asm("udf.w #0"); Unfortunately the GNU CC inline assembler does not know this opcode for…
harper
  • 12,491
  • 6
  • 49
  • 95
9
votes
1 answer

Ubuntu: What gcc to use when crosscompiling for the STM32 (Cortex-M3)?

I'm trying to get started with the STM32 (Cortex-M3) and my plan is get this working from Ubuntu (9.04 / AMD64). To start with I got the Olimex stm32-h103 header board and the Olimex ARM-USB-OCD jtag, and on to of that I will probably use OpenOCD,…
Johan
  • 18,177
  • 25
  • 89
  • 107
8
votes
2 answers

Fixed point math with ARM Cortex-M4 and gcc compiler

I'm using Freescale Kinetis K60 and using the CodeWarrior IDE (which I believe uses GCC for the complier). I want to multiply two 32 bit numbers (which results in a 64 bit number) and only retain the upper 32 bits. I think the correct assembly…
EpicAdv
  • 904
  • 10
  • 21
8
votes
2 answers

Fastest polling loop - how can I trim 1 CPU cycle?

In a realtime application¹ on an ARM Cortex M3 (similar to STM32F101), I need to poll a bit of an internal peripheral's register until it's zero, in as tight a loop as possible. I use bit banding to access the appropriate bit. The (working) C code…
fgrieu
  • 2,505
  • 1
  • 17
  • 45
8
votes
1 answer

Is unaligned access in Cortex-M4 atomic?

In the ARM documentation, it mentions that The Cortex-M4 processor supports ARMv7 unaligned accesses, and performs all accesses as single, unaligned accesses. They are converted into two or more aligned accesses by the DCode and System bus…
Ken Lin
  • 725
  • 1
  • 5
  • 17
8
votes
3 answers

Switching context inside an ISR on Cortex-M

I'm trying to write a barebones round-robin scheduler for the Cortex-M using the CodeSourcery GCC toolchain. My scheduler uses the SysTick to fire an interrupt after the expiry of a time slice and the context switching takes place inside the ISR. To…
8
votes
2 answers

arm thumb mode 4byte instructions

Thumb mode instructions are 2 bytes and ARM mode instructions are 4 bytes. the screenshot is a disassembly of thumb mode instructions. why do I see 4 byte instructions mixed with 2byte instructions?? can someone explain this? thank you in advance.
daehee
  • 4,417
  • 6
  • 36
  • 60
8
votes
3 answers

Any function instead of sprintf() in C? code size is too big after compile

I am working on developing an embedded system (Cortex M3). For sending some data from the device to the serial port (to show on a PC screen), I use some own functions using putchar() method. When I want to send integer or float, I use sprintf() in…
Django
  • 149
  • 1
  • 3
  • 9
7
votes
2 answers

Advice on linker script creation and verification

Long story short. I wish to learn how to create a good linker script so that should I change platforms/architectures/vendors, I'm not stuck at ground zero again with not knowing what to do. I'm not concerned with the difficulty of the task, so much…
Crewe
  • 303
  • 2
  • 8
7
votes
3 answers

reading a 64 bit volatile variable on cortex-m3

I have a 64 bit integer variable on a 32 bit Cortex-M3 ARM controller (STM32L1), which can be modified asynchronously by an interrupt handler. volatile uint64_t v; void some_interrupt_handler() { v = v + something; } Obviously, I need a way to…
7
votes
4 answers

Advice needed for ARM Cortex M3 beginner

I will embark on the ARM Cortex M3 bandwagon soon with an official training (CPU side). Now, I did a bit of Arduino and AVR before and have some basics in electronics but I am mostly a software developer. I've read most topics in here and quite a…
Zot Ditz Myo
  • 103
  • 1
  • 5
7
votes
1 answer

Does the Cortex-M3 STM32F103 core stall during a flash page erase because the FPEC is busy and can't fetch any more instructions from flash?

On the STM32F103, the erasing of a flash page takes 20ms during which the core stalls for me. It's not clear from the ST PM00042 Flash programming manual whether the core would always stall when erasing a flash page or whether it just stalls because…
Captain NedD
  • 307
  • 5
  • 11
7
votes
2 answers

Zeroconf Name resolution

I am developing a control device with an embedded webserver. The webserver provides a control interface to any web browser that requests it (from Windows browsers, Mac browsers, iPhone android etc). The problem I am having is with a general way of…
Robert Jerome
  • 71
  • 1
  • 2
1
2
3
28 29