These forums are read only, please use our new forums here.

Main :: ToneCore Development Kit



Building MCU code in Codewarrior v10.2
by dtfee on 2012-11-21 07:42:14

Hi Folks,

This is my first post. I'm a UK based software engineer with an interest in music DSP so I thought I purchase this kit through a US based friend. So far it's been a really steep learning curve but I wanted to upload my experience of trying to build the MCU code (microcontroller only) on a PC running windows XP and see if anybody else had any tales of their experience they'd like to share. At the moment Freescale offer a special edition of Codewarrior for MCUs - v10.2. It's a bit ropey but after weeks of faffing about here's my instructions for getting the build to work:

1. Download and install Codewarrior 10.2 (special edition - free)

2. Create an empty workspace on the same drive as the installation, e.g. C:\ToneCore

3. Copy 'MCU sample code' to a directory under the workspace directory and rename MCU_sample_code. This avoids any problems with include paths.

4. Import the project following the instructions outlined here: 

http://www.freescale.com/infocenter/index.jsp?topic=%2Fcom.freescale.doc.CodeWarriorProjectImporter.QuickStart%2Fdoc%2FProject_Importer_Guide.CodeWarrior_Development_Studio.html

where the MCP file is 'TCDDK User Template Rev 1.mcp'.

5. When you get to the 'Access Paths' part of the import, add an extra entry: {Compiler}\lib\HC08c\device and set 'Recursive' to true.

6. Click next, there should be only one entry: User_Template_Project.map. Else, search for the missing folders and go back to 5 to add the paths.

7. Continue to Finish, selecting the remaining defaul options.

8. At this stage, you can try a build - Project -> Clean... (selecting 'Start a build immediately'). You may be lucky and everything works fine. 

9. If, like me, you weren't, right-click the project in Project Panel, select 'Edit Linked Resource Locations' and select 'Linked Resources' tab.

   Likely, you'll see a list of Invalid Locations. Click 'Path Variables' and edit CW_IMPORTER_ProjectDir, replacing ${PARENT_LOC} with the actual path.

10. At this stage, you may get as far as 'No rule to make target...' referring to a path containing virtual/virtual.

    Open Properties, select 'C/C++ Build -> Settings' and select 'S08 Linker -> Input'.

    Edit the Parameter File entry before 'MCU sample code\...' to your correct location.

11. Rerun the build. We now get a bunch of linker errors mostly referring to main.c and IO_Map_c.obj.

    This is because something called ProcessorExpert generates another copy of the same code.

    Under the 'User Modules', delete the TCDDK_User_Template_Rev_1.c file (or whatever generated file contains an empty main function) and

    under 'Generated Code' delete IO_Map.c.

12. Rerun the build. Hopefully this time it all worked and you have a nice new MCU_sample_code.abs.s19 file to download through the TCDDK GUI.

I'd be interested to hear from anyone who's found this useful.

Best wishes

DTFee




The information above may not be current, and you should direct questions to the current forum or review the manual.