DS 2.1.0 generated.c strangeness

Hi All.

Having some issues moving a project from R7.43 firmware to R7.45 using DS 2.1.0 (for both projects).

The R7.43 project was originally created using the SDK profile ‘OpenAT Embedded Software Suite package (’
The R7.43 project has the Application settings editor disabled with task table (and associated constants) hard coded into the main.c source file. This has worked extremely well.

I created a new project based on the SDK profile ‘OpenAT Embedded Software Suite package (2.35.201107291230)’, copied my existing source and headers into the new project tree, and used the Application settings editor to generate the correct mos_headerSEList[] etc.

A ‘Clean Project’ correctly builds the dwl and associated files.

I then copied the contents of generated.c into the main.c (as done previously) and disabled the Application settings editor (which removes generated.[ch]).

A ‘Clean Project’ appears to build all the object files, but fails near the end of the process when invoking ‘python.exe’ with the following error:

C:\OpenAT-2.36-DS-2.1.0\Developer Studio\tools\armelfgcc\4.0.1\bin\arm-elf-gcc.exe -D__OAT_API_VERSION__=635 -D__CGPS_PLUGIN_VERSION__=107 -D__WIP_PLUGIN_VERSION__=541 -D__DEBUG_APP__ -DDS_DEBUG -D__arm -D__GNU_GCC__ -IC:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.os.model.\resources/ADL/itf -IC:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.os.model.\resources/ADL/basic -IC:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.plugin.model.C-GPS-OPUS-I.\resources/C-GPS-OPUS-I/itf -IC:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.plugin.model.WIP.\resources/WIP/itf -IR:\Design\0066.LeonardiPartyBus\Software\OpenAT-2.36-DS2.1.0\PB-0.6.0\itf -IR:\Design\0066.LeonardiPartyBus\Software\OpenAT-2.36-DS2.1.0\PB-0.6.0\inc -O0 -Os -ggdb3 -Wall -c -fshort-enums -fdollars-in-identifiers -nostartfiles -fno-strict-aliasing -fno-common -fomit-frame-pointer -mthumb-interwork -mthumb -march=armv5te -msoft-float -mfpu=fpa -mapcs -mno-apcs-stack-check -osrc\Event\createevent.o ..\src\Event\createevent.c
C:\OpenAT-2.36-DS-2.1.0\Developer Studio\tools\armelfgcc\4.0.1\bin\arm-elf-g++.exe -Wl,--script,gcc.lkopt src\voice.o src\tcu.o src\sms.o src\main.o src\gps.o src\event.o src\digitalio.o src\configuration.o src\comms.o src\comms\comms_smtphandlers.o src\comms\comms_ftphandlers.o src\comms\comms_datahandler.o src\comms\comms_datacevwrite.o src\comms\comms_datacevread.o src\comms\comms_datacevopen.o src\comms\comms_dataceverror.o src\adFlash\adwrite.o src\adFlash\adrecompact.o src\adFlash\adread.o src\adFlash\adopen.o src\adFlash\adinit.o src\adFlash\adformat.o src\adFlash\adfinalize.o src\adFlash\adeventhandler.o src\adFlash\addelete.o src\adFlash\adclose.o src\Main\handlerwind15.o src\Main\handlerwhcnf.o src\Main\handlercgsn.o src\Main\handlerat.o src\Main\gprs.o src\Helpers\millimetertometer.o src\Helpers\gccspecific.o src\Helpers\doubletostring.o src\Helpers\consoleoutput.o src\Helpers\bround.o src\Event\formatEventLogitem.o src\Event\eventlist.o src\Event\createevent.o src\Event\buildjsoneventstring.o src\Event\broadcasttaskmsg.o src\CGps\eride.o src\CGps\cpgsgpio.o src\CGps\cgpscore.o src\CGps\cgpsconstants.o -Wl,-( -nostartfiles -Os -O2 -fshort-enums -fdollars-in-identifiers -ggdb3 -fomit-frame-pointer -mthumb-interwork -mthumb -march=armv5te -msoft-float -mfpu=fpa -mapcs -mno-apcs-stack-check -Wl,-nmagic -Wl,-Map,PB-0.6.0.map C:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.os.model.\resources\ADL\ARM_ELF_GCC_ADL.lib C:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.plugin.model.C-GPS-OPUS-I.\resources\C-GPS-OPUS-I\gcc_CGPS_0. C:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.plugin.model.WIP.\resources\WIP\ARM_ELF_GCC_WIP.lib C:\OpenAT-2.36-DS-2.1.0\Developer Studio\dropins\com.wavecom.openat.ide.spm.lib.plugin.model.WIP.\resources\WIP\ARM_ELF_GCC_WIPSoftLib.lib -Wl,-) -oPB-0.6.0.axf
C:\OpenAT-2.36-DS-2.1.0\Developer Studio\plugins\com.wavecom.openat.ide.ebs.build.core.win32_2.1.0.201108080830-R7547\os\win32\python\python.exe -E C:\OpenAT-2.36-DS-2.1.0\Developer Studio\plugins\com.wavecom.openat.ide.ebs.armelfgcc_2.1.0.201108080830-R7547\scripts\fromelf.py C:\OpenAT-2.36-DS-2.1.0\Developer Studio\plugins\com.wavecom.spm.utils_1.2.2.201107261502-R7480\elfutils PB-0.6.0.axf PB-0.6.0.cpbin
Traceback (most recent call last):
  File "C:\OpenAT-2.36-DS-2.1.0\Developer Studio\plugins\com.wavecom.openat.ide.ebs.armelfgcc_2.1.0.201108080830-R7547\scripts\fromelf.py", line 15, in <module>
    parsedElf = ElfFile ( file ( AXFFile, "rb" ) )
IOError: [Errno 2] No such file or directory: 'PB-0.6.0.axf'
Build error occurred, build is stopped

As you can see, it appears that the linker is not building the .axf file correctly - but does not appear to be throuwing an error.

Finally, If I revert the project SDK profile back to 2.33 (without the application settings editor), the code compiles correctly.

What am I missing?

ciao, Dave

In my opinion, it doesn’t sound to be related to the use of generated.c or not…
Did you made the try of keeping the task table declaration in generated.c, to check if the issue persists or not?
Can you also give a try to make another app based on 2.35, and verify if the app builds correctly…

Otherwise, it seems to be an ARM ELF GCC linker bug with your particular code + libs collection… :confused:

Hi Daav,

Thanks for the suggestions.

As you suggested, I created a clean project based on 6.35, with the OPUS I and Wip libraries (as per my problem project). I created the same file structure and same task initialization functions that are stubbed out (i.e. do nothing). I created the same task table using the Application settings editor and built the project. All OK.

I then copied the contents of generated.c into my main.c file (as I did previously), unchecked the Use Application settings editor and rebuilt the project. No problems either…

Now to merge my existing code into the clean project and see where it blows up.

I’m just confused about why the problem project builds when using the Application settings editor, and fails when I copy the contents of generated.c into main.c and disable the editor. Nothing else has changed - no other project settings etc…

Thanks for your help.

ciao, Dave

Then the question is: what is the reason why you don’t want to use the generated.c file? :wink:


Because some of my applications are certified to operate on a specific verion of firmware. If there’s a problem, I (and my clients and certifying authorities) need to be able to pull the archive and build/debug exactly what I put in the modem, and not have to think about what the dev environment has decided to autoconfigure for me…

I will admit that it’s a nice way to get started though…

ciao, Dave