This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What are the compile option differences between --specs=nosys.specs and --specs=rdimon.specs in arm-none-eabi-gcc?

1.

As title. 

and what time I need to add options  ?

I know add --specs=nano.specs thas is mean using newlib-nano when I use arm-none-eabi-gcc.

In readme, rdimon is for semihosting. Nosys is for retarget.

We use bare metal system and printf retarget to AXI port. What option I need to select ?

2. Does newlib support reentrant in arm-none-eabi-gcc?

Newlib provide two version function first is usual name . Second is reentrant version "_xxx_r"

How to choose the function when compile my code? Or I don't need know that.

Ex :  _write_r , write

3. Are both of two function target to _write?

I implement _write function will retarget printf.

I not sure printf will call which function. _write_r , write, _write

Parents
  • 1. nosys.specs, as your usage is retarget

    2. it is not reenterable as some shared resources (heap managed by malloc/free) are not protected with locks or any mechanism.

    3. _write_r will invoke _write. So retargeting _write should be enough.

    A very quick answer based on knowledge in memory. Maybe wrong but further questions are welcome.

Reply
  • 1. nosys.specs, as your usage is retarget

    2. it is not reenterable as some shared resources (heap managed by malloc/free) are not protected with locks or any mechanism.

    3. _write_r will invoke _write. So retargeting _write should be enough.

    A very quick answer based on knowledge in memory. Maybe wrong but further questions are welcome.

Children