CW10.2 wizard for mqx project will not build working project, fatal compiler errors

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

CW10.2 wizard for mqx project will not build working project, fatal compiler errors

1,141 Views
Cdn_aye
Senior Contributor I

I think this is mqx related. We have the twrk20d72m board. We run cw10.2 and mqx 3.8.0 with all the patches uptodate; as of july 04 2012.

 

We run the wizard to build a project in cw10.2 empty project including mqx, no pe, no stacks or file system, nothing added for files. We choose the twrk20d72m board as the base for mqx. The project is generated and the compiler errors on a fatal issue.

 

Description Resource Path Location Type Overflow in segment: rom from section: .main_application Segment reserved size is: 0x00007be0 -- Overflow of: 0x00001928 k20_72    C/C++ Problem

 

All the mqx libraries are rebuilt correctly. We can build a simple PE project for the GPIO and get that to work, but we cannot get cw10.2 to build a project under any circumstances. The same is true of not all but some of the example projects. They error out or do not run correctly.

 

Does anyone have any mqx base that they have been able to get to work on the k20?

 

this is running on Win 7 x64, sp1.

 

Any help is desparately appreciated. We can't test our inhouse boards because we can't even get the basic development system to work.

 

 

Tags (4)
0 Kudos
8 Replies

509 Views
c0170
Senior Contributor III

Hi Cdn_aye,

 

You selected RAM target. The error describes the sector has not enough size (32kB) to store the project (38.5kB).

Use Flash target in this case and you shouldn't experience any problem with segment overflow.

Some MCU have small RAM size and anyway RAM target is only for debugging purpose.

 

Regards,

MartinK

0 Kudos

509 Views
Cdn_aye
Senior Contributor I

Hi Kojto

 

That might be the solution... almost. I did not realize that the build was defaulting to RAM. I used the build manager to change it to FLash. However there is still one fatal error and several pragma warnings. Is there something else that needs to be set somewhere? This has errors related to some Thumb library that we have no knowledge of ever using. Is there a build option we need to use in rebuilding the patched k20 libraries?

 

Thank you

 

Description Resource Path Location Type Link failed. k20_72.1    C/C++ Problem illegal #pragma k20_72.1  line 49, external location: C:\Freescale\Freescale MQX 3.8 TWRK20D72M\lib\twrk20d72m.cw10\psp\mqx.h C/C++ Problem Symbol calloc multiply defined in libc_Thumb_LE_v7M.a(alloc.o        ) and bsp_twrk20d72m_d.a(cw.o           ) Ignoring the definition in libc_Thumb_LE_v7M.a(alloc.o        ) k20_72.1    C/C++ Problem Symbol exit multiply defined in libc_Thumb_LE_v7M.a(abort_exit.o   ) and bsp_twrk20d72m_d.a(cw.o           ) Ignoring the definition in libc_Thumb_LE_v7M.a(abort_exit.o   ) k20_72.1    C/C++ Problem Symbol free multiply defined in libc_Thumb_LE_v7M.a(alloc.o        ) and bsp_twrk20d72m_d.a(cw.o           ) Ignoring the definition in libc_Thumb_LE_v7M.a(alloc.o        ) k20_72.1    C/C++ Problem Symbol isgraph multiply defined in libc_Thumb_LE_v7M.a(ctype_aeabi.o  ) and psp_twrk20d72m_d.a(io_util.o      ) Ignoring the definition in libc_Thumb_LE_v7M.a(ctype_aeabi.o  ) k20_72.1    C/C++ Problem Symbol isupper multiply defined in libc_Thumb_LE_v7M.a(ctype_aeabi.o  ) and psp_twrk20d72m_d.a(io_util.o      ) Ignoring the definition in libc_Thumb_LE_v7M.a(ctype_aeabi.o  ) k20_72.1    C/C++ Problem Symbol malloc multiply defined in libc_Thumb_LE_v7M.a(alloc.o        ) and bsp_twrk20d72m_d.a(cw.o           ) Ignoring the definition in libc_Thumb_LE_v7M.a(alloc.o        ) k20_72.1    C/C++ Problem

0 Kudos

509 Views
c0170
Senior Contributor III

Hello there,

 

I can't really spot the error there. I see link failed. Does it show anything more?

 

Warnings can be suppressed in Project settings -> Tools Settings -> ARM Linker -> Input - the box Suppress Link Warnings.

 

Regards,

MartinK

0 Kudos

509 Views
Cdn_aye
Senior Contributor I

The problem is not the warnings, it is the fatal errors. I will redo the wizard tomorrow, it is almost midnight here now, and post a video of the build.

 

I have seen that someone else had problems as well but they went to the IAR system and all the examples compiled without error. Just for information.

 

Can you bulid a blank project with mqx, and PE for the k20 and post the export? I will try on my system and see if I can get it to compile. That will test the enviroment.

 

 

0 Kudos

509 Views
c0170
Senior Contributor III

Hi cdn_aye,

 

how is it looking? I created test example application for K20D72 in CW10.2 (no PE). No errors were popped up for Flash target.

 

Regards,

MartinK

0 Kudos

509 Views
Cdn_aye
Senior Contributor I

There is still a fatal error, but the fix is to clean the project a second time and it goes away. The blank template will load. Now we have to find a way to change from the twrk20d72m bsp to one that supports the k20dx256z processor. Would you know where to look for info on this?

 

Thanks

0 Kudos

509 Views
c0170
Senior Contributor III

Hi cdn_aye,

 

I really don't understand the error . How it could happen always with first build of the project and what type of error is it.

Back to your question, here's porting guide : http://cache.freescale.com/files/32bit/doc/app_note/AN4287.pdf

 

There might be more information also on the forum. OR here: http://www.towergeeks.org/forum/topics/cloning-a-bsp

 

Regards,

MartinK

0 Kudos

509 Views
Cdn_aye
Senior Contributor I

Hi MartinK

 

The error is known in FSL / Support, this is where I got the method of doing a clean a second time.

 

Thank you for the info on building a new bsp and psp. I did that for our board and all the files are correct, the linkages and libraries are ok.

 

The next step is to change the particulars for the board. We are using the k20dx256z, we used the twrk20d72m as the baseline. So we need to modify the appropriate files for our processor. The question is which files and what are the modifications. Can you get us started in the right direction please? Our board will load with the new build against the new libraries but of course it still crashes because the internals of the processor do not match.

 

We can load a PE only project into our board and it works, but we have to have MQX. Therefore there must be FSL header files and init files already created that work. But I don't know where or which ones. Any help would be appreciated. Thanks.

 

Robert

0 Kudos