Why am I getting a compiler error on ../Project_Settings/Startup_Code/startup_ARM_CC.c?

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

Why am I getting a compiler error on ../Project_Settings/Startup_Code/startup_ARM_CC.c?

1,322 Views
robriggs
Contributor II

I have set up PE 10.3 for Eclipse on Linux (Fedora 19).  I am using arm-none-eabi-gcc.

I am following along a tutorial for MQX Lite.  Everything goes OK until the build phase.

arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -O2 -fmessage-length=0  -g -I../Generated_Code -I../MQXLITE/config -I../MQXLITE/include -I../MQXLITE/kernel -I../MQXLITE/psp/cortex_m -I../Sources -I../Project_Settings/Startup_Code -I"/usr/lib64/ProcessorExpert/lib/Kinetis/iofiles" -I"/usr/lib64/ProcessorExpert/lib/Kinetis/pdd/inc" -MMD -MP -MF"Project_Settings/Startup_Code/startup_ARM_CC.d" -MT"Project_Settings/Startup_Code/startup_ARM_CC.d" -c -o "Project_Settings/Startup_Code/startup_ARM_CC.o" "../Project_Settings/Startup_Code/startup_ARM_CC.c"

../Project_Settings/Startup_Code/startup_ARM_CC.c:24:7: error: expected '(' before 'void'

__asm void __thumb_startup(void) {

       ^

The syntax in startup_ARM_CC.c is clearly not GNU compatible.  How do I fix this?

9 Replies

854 Views
microeval
Contributor I

Hi All,

Can some one suggest me how to change the compiler option in the code warrior IDE to generate the MQX-Lite source for the IAR project(IAR ARM C Compiler).

Not able to get the IAR ARM COMPILER option in the code warrior IDE(10.5).

I have KL46Z board and created the IAR project for the KL46Z, want to use the MQX_Lite RTOS in my project.

Thanks in advance,

--Ram.

0 Kudos

854 Views
petr_uhlir
NXP Employee
NXP Employee

Hi Rob,

I expect you have created application from bareboard project which uses startup in Project_Settings/Startup_Code/startup_ARM_CC.c. The MQX Lite uses its own startup in __boot.S so try to delete the startup_ARM_CC.c from project.

Regards Petr

0 Kudos

854 Views
robriggs
Contributor II

I think my problem is earlier.  I was a bit tired when going through this yesterday and missed it.  I am following the video Processor Expert: Creating an MQX Lite Project (Driver Suite) .  I followed the steps:

Start Eclipse

File|New|Processor Expert MQX-Lite Prjejct

Pick the MCU derivative (KL20DX256xxx7)

There is not option at this point to click "Next" (it is greyed out), so I never have a chance to pick the build tools as is done in the video.

I had to set up the build tools after the fact.  So something is not tracking with the demo video.

I'm using Fedora 19, Eclipse Kepler (from Fedora RPMS) and have a couple GCC ARM build systems installed.

0 Kudos

854 Views
Petr_H
NXP Employee
NXP Employee

Hi,

we have identified this to be a bug. It can be workarounded by creating  the bareboard Processor Expert project and add MQXlite component later.

We apologize for an inconvenienc, it will be fixed in the next Driver Suite versions.

Best regards

Petr Hradsky

Processor Expert Support Team

0 Kudos

854 Views
jvasil
Contributor III

I encountered this problem last week as well and thought it was related to the fact that when I first created the project, I didn't set the compiler option and that it was set to Keil by default.  I've gotten the project to build w/o this file but when I change some of the settings in PE and then "Generate Processor Expert Code", startup_ARM_CC.c gets added back to the generated source code.  This is true even though I have changed the compiler option to IAR since then.

The workaround proposed by Jack Blather, above, doesn't seem to work for me because I don't see a Startup section on the build options tab of the processor (MK64FN1M0VLQ12 if it matters).

Before I start on the unpleasant task of recreating my project (I've got ~25 components defined) I'd like to make sure that there is no easier way to get around the problem using an existing project?  Also, is there anything that needs to be done between creating the bareboard PE project and adding the MQXlite component?  And will this problem come back when more components are added?

Thanks,

James

0 Kudos

854 Views
Petr_H
NXP Employee
NXP Employee

Hi,

This is most probably related to a known problem in Processor Expert core. For proper removing files, it's necessary to perform the Code Generation twice. After second code generation the startup_ARM_CC.c is removed. Please try that and let me know, if it helps.

Regarding the recreation of the project -  it's possible to import all the components with settings from other project using File > Import and select Processor Expert / Component Settings to Project.

Best regards

Petr Hradsky

Processor Expert Support Team

854 Views
jackblather
Senior Contributor I

You can tell PEx to not generate the startup file.

In the "Components" window, open "Processors". click on the Cpu.

In the "Component Inspector" window, click on the "Build options" tab.

Scroll down to "Startup", expand it.

For "Add startup file", select "no".

0 Kudos

854 Views
robriggs
Contributor II

You can tell PEx to not generate the startup file.

That is helpful.  I also was able to change the Compiler in that screen. to "GNU C Compiler".  Do you know if that means that C++ is not supported with GCC?

0 Kudos

854 Views
jackblather
Senior Contributor I

I don't know about that. However, I always pick the Keil compiler in PEx and use the ARMCC compiler in the Project Settings. Turns out the two compilers are almost the same beast. I've been having a lot of success with that combination.

0 Kudos