cancel
Showing results for 
Search instead for 
Did you mean: 

Where we can find source of newlib bundled with CubeIDE and TrueStudio

Pavel A.
Evangelist III

The list of patches is published here, but can we see the actual (configured and patched) source?

Thanks,

-- pa

8 REPLIES 8
chaaalyy
Senior II

Good question...

But when i read this:

https://community.st.com/s/question/0D50X0000BB1eL7SQJ/bug-cubemx-freertos-projects-corrupt-memory?t=1587281137067

and this:

http://www.nadler.com/embedded/newlibAndFreeRTOS.html

... maybe it helps to see at least some of the NOT implemented patches :(

berendi
Principal

It does not matter what patches are implemented.

ST must publish the actual sources used to build their versions of GPL licensed software, including the toolchain (gcc and friends), newlib, openocd.

By redistributing them in STM32CubeIDE, they are violating the copyright of their respective authors, including ARM, Red Hat, and a thousand others.

Looks like someone forgot to check things with the compliance department.

UPDATE

I've got around to check the licenses, newlib is (mostly) not GPL, so the requirement applies rather to the GNU/GCC toolchain and openocd

Hey... Don´t shout that out loud... That would make many inept st professionals unemployed and we would get even less support than now... Although... 0.1% - 50% of 0.1% = ? Nothing to be worth mentioned...

Yes, this is why I'm asking. Mr. Nadler calls for urgent action, and we need to see the actual configured library source. Of course, it is possible to do black box tests based on the upstream source and version numbers in the compiled libraries, but why.

-- pa

I also can just check this:

https://www.st.com/resource/en/release_note/dm00603738-stm32cubeide-release-v130-stmicroelectronics.pdf

and there´s nothing to be found about that issue. Even in the "Main limitations in STM32CubeIDE v1.3.1" it´s just not listed.

Maybe it´s a hint: Checking project properties -> c/c++ build -> environment will give you the path variable... the gnu toolchain seems to be 2018_q2 here

RN0114 does not mention newlib at all, though it mentions "GNU Tools for STM32, based on GNU Tools for Arm Embedded Processors".

IMHO the newlib vs FreeRTOS issue is not a CubeIDE limitation at all. It is internal issue of integration of the newlib bundled in object form, with templates used to generate code, and FreeRTOS example projects.

-- pa

Pavel A.
Evangelist III

> I've got around to check the licenses, newlib is (mostly) not GPL, so [......]

Then we have to resort to blackbox techniques.

What I wanted to find is, how exactly are implemented locks per protocol defined in sys/lock.h and what is better: provide specific locking function for malloc as in Mr. Nadler's proposal, or implement 'common' locks per sys/lock.h.

Also, find which other relevant parts of the library need locks (printf?)

-- pa

alister
Lead

These are what I'd found when I'd started with TrueSTUDIO. From this you should be able to find similar for STM32CubeIDE.

From http://gotland.atollic.com/resources/manuals/9.3.0/readme.txt:

IDE, Toolchain and software: 
* Based on Eclipse Neon version 4.6.1 and CDT version 9.1.0 
* Atollic ARMTools toolchain, (Build 17.03) 6.3.1 20170215 (release) 
   based on [ARM/embedded-6-branch revision 245512] + patches 
   Built on new GCC, GDB and Newlib versions 
    GCC 6.3.1 20170215 + patches 
    Binutils 2.27.90.20170215 
    libgcc patched - "Disable JCR section when java is not enabled" 
    GNU C++ library 
    Newlib 2.5.0 (including Newlib-nano) 
    nosys library 
    GDB 7.10.1.20160923-cvs 
    Supporting floating point hardware 
     FPv4-sp-d16 
     FPv5-sp-d16, FPv5-d16 
     NEON-VFPv3, VFPv3-D16, VFPv3-D32 
     NEON-VFPv4, VFPv4-D16, VFPv4-D32 
* PC Toolchain 
   Based on MinGW (GCC version 5.3.0, GDB version 7.6.1) 
* Java(TM) SE Runtime Environment (build 1.8.0_181) 
* STMicrolectronics ST-LINK_gdbserver v5.0.2 
* Segger J-Link GDB Server v6.42b 
   Updated Segger GDB Server can be downloaded from Segger web-site 
    Latest J-Link Software is available here 
     https://www.segger.com/downloads/jlink 
    Latest beta version is available here 
     https://www.segger.com/downloads/jlink_beta

Links...

  1. "C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\ide\plugins\com.atollic.truestudio.pro.arm.doc_1.0.0\documents\libc.pdf " <-- Atollic TrueSTUDIO, The Red Hat newlib C Library Full Configuration libc 2.5.0, December 2016
  2. ftp://sourceware.org/pub/newlib/newlib-2.5.0.tar.gz <-- Newlib 2.5.0 source code. 
  3. https://gcc.gnu.org/pub/binutils/snapshots/binutils-2.27.90.tar.bz2 <-- GNU Binutils source code.