EmbeddedRelated.com

Override libc functions

Started by pozz in comp.arch.embedded2 years ago 8 replies

Many times I'd like to replace libc functions in embedded systems, because of some tests or because I need a different implementation. For...

Many times I'd like to replace libc functions in embedded systems, because of some tests or because I need a different implementation. For example, sprintf implementation of newlib uses malloc and I can't use it many times. It sometimes happens that I can use malloc, with some restrictions. Just for test or optimization, I replace libc malloc with my own implementation. In these cas...


Run-time diagnostics in deliverables

Started by Don Y in comp.arch.embedded2 years ago

I design with a real-time, live "monitor" in my projects. It gives me low level access to everything happening in the device AS it is happening....

I design with a real-time, live "monitor" in my projects. It gives me low level access to everything happening in the device AS it is happening. I can attach to a particular process and examine/alter objects in its address space, pause/resume, stop/restart, etc. It's a poor-man's ICE with limited footprint (unlike supporting a full debugger in the release). For certain classes of projec...


Useful bonus feature

Started by Andrew Smallshaw in comp.arch.embedded2 years ago 3 replies

I'm just doing some rough prototyping at the minute and to save squinting I put a identifying label on the MCU showing part no and orientation,...

I'm just doing some rough prototyping at the minute and to save squinting I put a identifying label on the MCU showing part no and orientation, from one of those thermal Dymo-style labelling machines. What I hadn't anticipated is the bonus feature - these are thermal labels so of course give a visual indication when the magic smoke gets let out. http://andrews.freeshell.org/news/20220821.c...


IAR ARM Cortex-M compiler does not align stack on 8-byte boundary

Started by StateMachineCOM in comp.arch.embedded2 years ago 6 replies

ARM ABI says that the stack should be 8-byte aligned, but I see cases where the stack is aligned only to 4-byte boundary. For example, I have...

ARM ABI says that the stack should be 8-byte aligned, but I see cases where the stack is aligned only to 4-byte boundary. For example, I have the following simple busy-delay function: void delay(int iter) { int volatile counter = 0; while (counter < iter) { // delay loop ++counter; } } This compiles with IAR EWARM 9.10.2 on ARM Cortex-M to the following


Why use non-free compilers (Keil, etc) for architectures supported by SDCC?

Started by Philipp Klaus Krause in comp.arch.embedded2 years ago 26 replies

I wonder why some developers choose non-free compilers (Keil, IAR, Cosmic, Raisonance, etc) when targeting architectures supported by the free...

I wonder why some developers choose non-free compilers (Keil, IAR, Cosmic, Raisonance, etc) when targeting architectures supported by the free Small Device C Compiler (SDCC). Answears that also mention the architecture besides the reasons would be particularly helpful.


Help with a HardFault on Cortex-M3

Started by pozz in comp.arch.embedded2 years ago

I'm stuck with a stupid issue on a Cortex-M3 (LPC1788 by NXP). It's a classical issue that happens randomly and in different ways when the...

I'm stuck with a stupid issue on a Cortex-M3 (LPC1788 by NXP). It's a classical issue that happens randomly and in different ways when the code is slightly changed, so it's very difficult to debug. MCUXpresso (IDE from NXP) and Ozone (a software from Segger) says that IBUSERR and FORCED are set when HardFault exception occurs. I understand it is related to a program counter with a wron...


Wide frequency range, arbitrary waveform DDS

Started by Stef in comp.arch.embedded2 years ago 3 replies

To generate frequencies from approximately 0.5 mHz to 12 MHz with a DDS a minimum clock of > 24, say 25 MHz, is required. To be able to go...

To generate frequencies from approximately 0.5 mHz to 12 MHz with a DDS a minimum clock of > 24, say 25 MHz, is required. To be able to go down to 0.5 mHz, a phase accumulator of at least 36 bits is required. This will give sub mHz resolution over the entire range. Nice for the low frequencies, but not of much use for MHz frequencies (in this application). Is there any objection to using a


The I/O drive characteristics in the Attiny24 Datasheet

Started by Johann Klammer in comp.arch.embedded2 years ago 1 reply

Good Morning, I was trying to guess the R_on from the curves in the datasheet and got following results: sinking Ron: 3V 1.4Ohm(maybe...

Good Morning, I was trying to guess the R_on from the curves in the datasheet and got following results: sinking Ron: 3V 1.4Ohm(maybe wrong) 5V 30Ohm sourcing Ron: 3V 47Ohm 5V 33Ohm I belive the 3V curve is wrong. It has the decimal point of the y axis in the wrong place. The chart in question is: Figure 23-19. I/O Pin Output Voltage versus Sink Current (V CC = 3V) on page...


I2C Communication between two Microcontrollers

Started by Neelakantappa M in comp.arch.embedded2 years ago 14 replies

I want to test the I2C protocol between two STM32 (STM32L152RC) microcontrollers. Can somebody guide me on how to do it or suggest tutorials? I...

I want to test the I2C protocol between two STM32 (STM32L152RC) microcontrollers. Can somebody guide me on how to do it or suggest tutorials? I have seen some online portals where they are communicating between a microcontroller and any sensor. That I have done already. Now I want to test it between two MCU boards.


Ftn I/Os documentation best practices

Started by Don Y in comp.arch.embedded2 years ago 11 replies

I add a boilerplate to each function definition that declares constraints on inputs, expectations of outputs, performance issues, etc. I use...

I add a boilerplate to each function definition that declares constraints on inputs, expectations of outputs, performance issues, etc. I use this to add invariants to the code to detect/enforce these conditions. But, there is nothing that ensures that I've done this -- other than discipline. I'm looking at ways to create an IDL that will allow for more specific criteria to be included ...


Ask a Question to the EmbeddedRelated community

To significantly increase your chances of receiving answers, please make sure to:

  1. Use a meaningful title
  2. Express your question clearly and well
  3. Do not use this forum to promote your product, service or business
  4. Write in clear, grammatical, correctly-spelled language
  5. Do not post content that violates a copyright