Console IO versus Download Executable

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

Console IO versus Download Executable

836 Views
nonarKitten
Contributor II

So I have a ColdFire V1 plus project where I'm using the TRAP#14 Console IO to provide test results in a multi-part project. I can modify the linker file to include the binary, but then I have no source-level debugging in the other parts of code, which isn't a show stopper, but it is annoying having to remember to always comment/uncomment the INCLUDE line. If I use the "Other Executables" tab in the debugger to load the symbols and/or download the image, then for whatever reason, the TRAP#14 interrupt stops working and I get no output -- very annoying.

 

I also found a compiler bug at optimization level 4 that sometimes causes an if statement to execute both blocks of the statement. This isn't really new; I find the ColdFire optimization routines often produce incorrect code, but sometimes we need it when "it's gotta fit".

 

Plus the home page says "Reed More". Someone should fix that. Pretty sad.

Labels (1)
0 Kudos
4 Replies

601 Views
trytohelp
NXP Employee
NXP Employee

Hello Renee,

To investigate the problem we need more information.

        - What is the tool version used (CW for MCU v6.3 or CW for MCU V10.6) ?

        - what is the device/processor ?

To resume it seems you've several problems/questions:

1- Problem to debug your application when a binary is included at link phase.

      Do you have a short example showing the behavior ?

2- Compiler bug at optimization level 4.

      We need an example code reproducing the behavior

3- Do you mean "Reed More" instead of "Read More" ?

      do you have a screen shot or info to help me to show it


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

601 Views
nonarKitten
Contributor II

1. CodeWarrior 10.6 for MCU, using the ColdFire plus JU128. I've used both a Cyclone Pro and USBDM to see if it had anything to do with the emulator in use and it had no effect. I can send you the project source code privately; you're welcome to try it out in either state.

a.) Within the kickstart project, I'm going to Debug Configurations -> Debugger tab -> Other Executables and including the elf from the hid_secondstageloader project. I then comment out the include for the 'ssl_copy' section and build. Running the project will now actually halt in the bdm_printf function and no longer print to the console.

b.) Reversing the above steps works fine but then I no longer have symbols and source-level stepping of the ssl code. So far I'm simply been using the linker includes back and forth to debug different sections. It's obvious when I forget, but annoying to have to change them every time.

Just an aside on all of this, and I'm not sure if KDS improves on this, but CodeWarrior and the Processor Expert tools aren't set up very well for these kinds of projects. It's not straightforward moving the VBR around (and no documentation that says you can move it to the dataflash which is really handy) and nothing supports it out-of-the-box. Testing the linkage between the assemblies is tricky; especially when the emulator will sometimes HALT on uninitialized memory regions (e.g., I'm testing the bootloader from a failed state).

2. Okay, got in this morning after the weekend and the disassembly code seems fine. Might have been Friday fog... LOL.

3. Yes (and sorry for nitpicking):
Capture.GIF.gif

0 Kudos

601 Views
trytohelp
NXP Employee
NXP Employee

Renee,

Point 3 fixed.

      https://community.freescale.com/community/codewarrior/cw-mcu


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

601 Views
trytohelp
NXP Employee
NXP Employee

Hi Renée,

Personally I've never used the Other Executable feature.

I don't have this board but a DemoQE128 board only.

However I found some interesting posts on web regarding this feature:

      http://mcuoneclipse.com/2012/12/08/adding-symbols-to-the-codewarrior-debugger/

      Re: Loading Multiple .elf files in one debug session

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