Topic : Generate Data Init

Forum : Ride IDE

Original Post
Post Information Post
September 20, 2019 - 12:33am
Anthony Chavez

I'm working on a project that will build on an older version of Ride7 running on Windows XP, however when I try to build it on the current version of Ride7 I get an error during the linking process that says the nvm is full. Trying to solve this problem I have been changing some settings in the LD Linker settings. When I change Generate Data Init to no, the project will build. The debugger does not seem to work how it should when I do this. I can't set breakpoints in the code when I do this and when I step into a function nothing happends. I can set breakpoints in the disassembly. The code I am using is all in assembly and its for the EM6819. I know that the Generate Data Init automatically generates code for initializing the data section, but I don't quite understand what that means. What could cause the difference in building from an older version of Ride7 on XP to the current version on Windows 10?

Replies
Post Information Post
+1
0
-1
September 20, 2019 - 10:08am
vincent choplin

Hello,

Thanks for your request.

There are possibly many differences between versions of Ride and RKit-C816, in the compiler and linker mostly, but not only. (and if changing DataInit makes a difference, that shows that you include more code than your assembly...)

I first recommend you read the Getting Started C816 document. It explains the differences between versions and gives tips for migrating from one version to another.

If that does not help, we would need to have more information about your situation: old and new versions of both Ride and RKit-C816, startup and linker script settings, use of "remove unused sections", maybe a map file, etc.

Best Regards,

Vincent

+1
0
-1
September 25, 2019 - 5:53pm
Anthony Chavez

I am using a custom start up and linker script. The linker script is the default script modified to to define 5 reserved rows. The script is from 2007 however so I made the changes stated in the Getting Started C816 document and it did not make a difference. Remove unused sections is not used, I get the same problem not being able to set breakpoints when I use it. The older version of Ride7 is 7.26.09.0351 and the version of Rkit is 1.02.09.35.

+1
0
-1
September 27, 2019 - 10:20am
vincent choplin

Hello,

The DataInit process initializes the data that is in the ".data", ".rodata", ".page0_data" sections. If you are using one or more of these sections, then you _must_ activate DataInit or the application will fail to execute correctly. If you are not using any of these sections, then you can disable DataInit to save some code. In this case you can remove the call to DataInit in the startup. Please check your source code and map file to see if there is anything in one of these sections.

Your previous version was very old and there might be some differences in the linker script that concern more than the compiler. Did you take the new default linker script and added your 5 custom sections to it, or did you take your old linker script and modified it according to the doc? I suggest you try both ways.

If you are using only assembler source code and your own linker script, both the version of the compiler and the DataInit option should have no impact on the code size. I suggest you check your map file to see if you are including more code than you expect.

It will be difficult for me to help you more without your project files. Could you send it to us? Or at least the linker script, startup and map file? We can sign a NDA if needed...

Best Regards,

Vincent