KDS 3.2 Missing source code for initialization files

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KDS 3.2 Missing source code for initialization files

1,164 Views
l3cswadams
Contributor II

I have a TWR-K65 board working with the FreeRTOS "hello_world" example using the windows version of KDS 3.2.  Now I am trying to step through the initialization code that occurs before main gets called.  Why are the initialization files like--(crt0.s, crtbegin.(s or c), crtend.(s or c)) not available in source code form as part of the KDS 3.2 release?  Aren't these suppose to be released as part of the GCC tools per the GPL?

Labels (1)
0 Kudos
12 Replies

1,001 Views
l3cswadams
Contributor II

We are trying to decide whether to use KDS and FreeRTOS for a product-line moving forward.  Unfortunately, I have a customer requirement to provide all source code as part of the release process, including all files in libraries used.  I will keep slugging away at this, but it may cause us to avoid using KDS and the Kinetis Family of parts if this issue becomes to onerous.

0 Kudos

1,001 Views
l3cswadams
Contributor II

I never did a project clean after moving the new directory in place.  After having done a project clean I can't build the code as before.  It appears I am having trouble because of a lack of some NANO "*_s.a" libraries.  Also when I look through the original directory there are a lot more "*_s.a" files there than what I have in the build of newlib and newlibNano.  For example the new build seems to be missing the C++ files.  Thoughts? 

0 Kudos

1,001 Views
BlackNight
NXP Employee
NXP Employee

Hi Michael,

yes, I remember something like this too. I believe somehow some of the libraries are not built somehow, maybe I missed them. I remember that I still kept some of the orginal libs which were not re-built somehow. Not an issue to me as I did not need these for debugging. Maybe you will find out what is missing?

Erich

0 Kudos

1,001 Views
l3cswadams
Contributor II

It seems like something is still missing.  When I replace the library with the newly built library, My code builds, however, I still don't see the source files when stepping into a file like crt0.S.  Thoughts?

0 Kudos

1,001 Views
BlackNight
NXP Employee
NXP Employee

Does the source show up if you step into something like printf() or malloc()?

Erich

0 Kudos

1,001 Views
l3cswadams
Contributor II

I see it now.  It is above the yellow highlighted section.  It also makes sense that ARM builds it with debugging turned on and then strips the symbols later.

I am now building these libraries under Linux and things have gone pretty well.  FYI, I can definitely tell you that the patch for the: "make file rules in the libgloss part:" must also be applied for a Linux build as well as a Windows build.

Thanks for your continued help

0 Kudos

1,001 Views
l3cswadams
Contributor II

Eric:

You're as good as my NXP FAE says you are.  Thanks.  This article has now even taught me how to do this kind of work on Windows.  Normally I do this kind of work under Linux as that is my preferred environment anyway.  I understand everything you have done in the article, however, I'm confused how this is adding in debug symbols to the libraries.  I don't see where the libraries are being built with a "-g" as I'm use to.  Thoughts? 

0 Kudos

1,001 Views
BlackNight
NXP Employee
NXP Employee

Hi Michael,

See the -g option in the screenshot named "newlib configuration options": there is the -g

I belive ARM builds the libraries with debug information and then strips the debug information off for the released package.

Erich

0 Kudos

1,001 Views
l3cswadams
Contributor II

Ok.  I've found the crt0.S file in multiple places in the gcc-arm-none-eabi-4_8 source tree.  Assuming the one in newlib/newlib/libc/sys/arm/crt0.S is the one we should be running against, how do I tell KDS that this is where the source code is located so that when it steps to "_start" it can correlate the assembly in my crt0.o file against this source code?

0 Kudos

1,001 Views
BlackNight
NXP Employee
NXP Employee

Hi Michael,

As the GNU libraries are built without debug information, you would have to rebuild them, see https://mcuoneclipse.com/2014/08/23/gnu-libs-with-debug-information-rebuilding-the-gnu-arm-libraries... 

I hope this helps,

Erich

0 Kudos

1,001 Views
BlackNight
NXP Employee
NXP Employee

Hi Michael,

A source file package is provided for download from the KDS download page (Kinetis Design Studio Integrated Development Environment (IDE)|NXP), but it does not include the unchanged/untouched packages as listed in the software content register. The GNU ARM Embedded toolchain used and included in KDS with the libraries and sources files are 'as is' from the Launchpad (GNU ARM Embedded Toolchain in Launchpad ) site. You can get all the library and compiler/etc sources from there.

I hope this helps,

Erich

0 Kudos

1,001 Views
l3cswadams
Contributor II

Thanks Eric.  I'll pull them down from there.

0 Kudos