Fail to generate a .srec file in CodeWarrior v. 10.6

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

Fail to generate a .srec file in CodeWarrior v. 10.6

1,065 Views
MAPC
Senior Contributor I

Hello,

 

I need to generate a .srec from a MQX 4.2 project, but I can't. I went to Project Properties and tried to enable this, as you can see in the following images bellow. I don't know if I missed something. Can anybody help me, please?

 

70896_70896.pngpastedImage_0.png

 

70897_70897.pngpastedImage_1.png

 

71021_71021.pngpastedImage_2.png

 

Thanks and best regards,

 

Marco Coelho

Labels (1)
0 Kudos
6 Replies

606 Views
BlackNight
NXP Employee
NXP Employee

Hi Marco,

the Console view (with the build messages/command line output) should show you more what the problem is. Can you share this?

Erich

0 Kudos

606 Views
MAPC
Senior Contributor I

Hello, Erich

Here it is:

**** Build of configuration int flash debug for project mfs_usb_twrk20d72m ****

"C:\\Freescale\\CW MCU v10.6.4\\gnu\\bin\\mingw32-make" -j8 pre-build main-build

C:/Freescale/Freescale_MQX_4_2/mfs/examples/mfs_usb/build/cw10gcc/mfs_usb_twrk20d72m/makedir.bat "C:/Freescale/Freescale_MQX_4_2/mfs/examples/mfs_usb/build/cw10gcc/mfs_usb_twrk20d72m/int flash debug"

' '

'Executing target #8 mfs_usb_twrk20d72m.hex'

'Invoking: ARM Ltd Windows GNU Create Flash Image'

"C:/Freescale/CW MCU v10.6.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-objcopy"  -O srec mfs_usb_twrk20d72m.elf "mfs_usb_twrk20d72m.hex"

makefile:112: warning: overriding recipe for target `mfs_usb_twrk20d72m.elf'

makefile:71: warning: ignoring old recipe for target `mfs_usb_twrk20d72m.elf'

C:/Freescale/CW MCU v10.6.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-objcopy: 'mfs_usb_twrk20d72m.elf': No such file

mingw32-make: *** [mfs_usb_twrk20d72m.hex] Error 1

Every time I enable Flash Image generation in Project Properties, this error comes up and the *.elf file that was in "Int Flash Debug" folder simply disappears. The same happens for other MQX 4.2 demos.

0 Kudos

606 Views
BlackNight
NXP Employee
NXP Employee

Hi Marco,

that 'pre-build' and 'main-build' looks strange.

And what is this makedir.bat doing?

The other thought I have is that you might have 'options per file', see http://mcuoneclipse.com/2013/06/12/traps-and-pitfalls-no-hexbins19-file-created-with-gnu/

I hope this helps,

Erich

0 Kudos

606 Views
MAPC
Senior Contributor I

Hello, Erich

I really don't know what are these pre-build and make.bat doing in the project. Actually, I just loaded the ".wsd file" which includes "mfs_usb" project with all the libraries, selected all the libraries, went to "Build Configurations", "Build Selected" options, cleaned and built all them together. After, I built only the demo itself. And I didn't change anything. I just enabled "Flash Image File" Generation in "Project Properties" and selected the srec format. We are taking this demo as our reference and a start point for our project.

If I repeat the same procedure for other demos, I have the same problem.

Regarding "options per file", I checked my makefile and it looks like those macros are ok, but I found something strange at line 70. There is a pre-build that shouldn't be there? And there is a warning at the line bellow it. I don't know if it means something.

pastedImage_0.png

There is no "Reset to Default" option for "Sources" and "Int Flash Debug" folders in "Resources Configuration", in context menu.

I've never imagined that could be so complicated!

0 Kudos

606 Views
trytohelp
NXP Employee
NXP Employee

Hi Marco,

I've performed some tests on my side.

I'm using CW for MCU V10.6.4 + patch V10.6.5  and MQX V4.2.

I've create a MQX project using the Project Wizard for:

    File + New + MQX v4.2 Project

    Give a project name + TWRK20D72M + Example application + MFS Examples + MFS_USB.

  

Now the example project was created but I can not build it as MQX libs were required.

MQX libs - import the wsd files for:

    bsp_twrk20d72m.wsd under \Freescale_MQX_4_2\mqx\build\cw10gcc\bsp_twrk20d72m

    psp_twrk20d72m.wsd under \Freescale_MQX_4_2\mqx\build\cw10gcc\psp_twrk20d72m

    mfs_twrk20d72m.wsd under \Freescale_MQX_4_2\mfs\build\cw10gcc\mfs_twrk20d72m

    usbh_twrk20d72m.wsd under \Freescale_MQX_4_2\usb\host\build\cw10gcc\usbh_twrk20d72m

    shell_twrk20d72m.wsd under \Freescale_MQX_4_2\shell\build\cw10gcc\shell_twrk20d72m

After to have build the MQX libs I can build the MQX example project without problem.

Now I selected Create Flash Image in Additionnal Tools and define the Output to srec.

When I build the project it's working fine.

Below extract of my console:

...

' '

'Building target: test_mqx_20D72M.elf'

'Executing target #7 test_mqx_20D72M.elf'

'Invoking: ARM Ltd Windows GCC C Linker'

"E:/Freescale/CW MCU v10.6.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc"    @"test_mqx_20D72M.args" -o"test_mqx_20D72M.elf"

'Finished building target: test_mqx_20D72M.elf'

' '

'Executing target #8 test_mqx_20D72M.hex'

'Invoking: ARM Ltd Windows GNU Create Flash Image'

"E:/Freescale/CW MCU v10.6.4/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-objcopy"  -O srec test_mqx_20D72M.elf "test_mqx_20D72M.hex"

'Finished building: test_mqx_20D72M.hex'

' '


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

606 Views
MAPC
Senior Contributor I

Hi, Pascal

Thanks for your response.

We found that .hex file is enough for generating images into Cyclone Pro. Now, it is just a matter of curiosity, because that is intriguing me. I haven't tested it with the separate libraries wsd files yet. I just took the .wsd file from C:\Freescale\Freescale_MQX_4_2\mfs\examples\mfs_usb\build\kds\mfs_usb_twrk70f120m. That brings out all the libraries together.

Also, I still don't know if 10.6.5 patch has something to fix it, because I didn't install it yet.

But I will repeat the tests following your steps and I let you know the results.

Thanks and best regards,

Marco Coelho

0 Kudos