User Tools

Site Tools


manual:demos:evbplus_dragon12p_codewarrior

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:demos:evbplus_dragon12p_codewarrior [2013/10/09 15:58]
voorburg [Building and downloading the Demo Program]
manual:demos:evbplus_dragon12p_codewarrior [2023/12/04 22:38] (current)
voorburg [Supported firmware update interfaces]
Line 1: Line 1:
 ====== EVBplus Dragon12-plus (Freescale HCS12DG256) Codewarrior ====== ====== EVBplus Dragon12-plus (Freescale HCS12DG256) Codewarrior ======
 +
 +===== Supported firmware update interfaces =====
 +
 +^ RS232         ^ CAN            ^ USB         ^ TCP/​IP ​     ^ SD-card ​     ^ Modbus RTU   ^
 +| Yes           | Yes            | No          | No          | No           | No           |
  
 ===== Development Environment ===== ===== Development Environment =====
Line 9: Line 14:
 To program the bootloader into the internal flash on the HCS12DG256 microcontroller,​ the [[http://​www.pemicro.com/​products/​product_viewDetails.cfm?​product_id=33| P&E Micro USB BDM Multilink]] interface was used. However, this is not required if you have another means of programming the internal flash. To program the bootloader into the internal flash on the HCS12DG256 microcontroller,​ the [[http://​www.pemicro.com/​products/​product_viewDetails.cfm?​product_id=33| P&E Micro USB BDM Multilink]] interface was used. However, this is not required if you have another means of programming the internal flash.
  
-To compile the demo programs you can use the [[http://www.freescale.com/webapp/sps/site/prod_summary.jsp?​code=CW-SUITE-SPECIAL&​tid=CWH|Freescale ​Codewarrior for HCS12(X)]] development environment. ​+To compile the demo programs you can use the [[https://www.nxp.com/support/developer-resources/software-development-tools/codewarrior-development-tools/​codewarrior-legacy/​codewarrior-development-suite-special:​CW-SUITE-SPECIAL|Codewarrior ​Development Studio ​for HCS12(X)]] development environment. ​
  
 ===== Building and programming the Bootloader ===== ===== Building and programming the Bootloader =====
 +
 Before the bootloader can be used, it needs to be built and programmed into the HCS12DG256'​s internal flash memory. The steps in this section only need to be done once. Before the bootloader can be used, it needs to be built and programmed into the HCS12DG256'​s internal flash memory. The steps in this section only need to be done once.
  
 When using Freescale Codewarrior,​ simply open the project from within Codewarrior and select //​Project->​Make//​ from the menu. The project file is located at: \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Boot**\ide\ When using Freescale Codewarrior,​ simply open the project from within Codewarrior and select //​Project->​Make//​ from the menu. The project file is located at: \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Boot**\ide\
 +
 +In case of build errors, refer to the information in section [[manual:​demos:​evbplus_dragon12p_codewarrior#​resolving_build_errors|resolving build errors]].
  
 The bootloader program is now ready to be programmed into the internal flash memory of the HCS12DG256. Using your favorite programmer, flash the bootloader using one of the following files, depending on what file type your programmer supports: The bootloader program is now ready to be programmed into the internal flash memory of the HCS12DG256. Using your favorite programmer, flash the bootloader using one of the following files, depending on what file type your programmer supports:
Line 21: Line 29:
   * \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Boot**\bin\**openblt_evbplus_dragon12p.abs.s19**   * \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Boot**\bin\**openblt_evbplus_dragon12p.abs.s19**
  
-===== Configuring Microboot ​===== +===== Building the Demo Program ​=====
-The Microboot utility needs to be configured to connect to the correct COM-port and to communication at the correct baudrate:+
  
-  * Start Microboot by double-clicking "​\Host\**MicroBoot.exe**"​. 
-  * Click the "​**Settings**"​-button and select "​**OpenBLT using UART**"​ from the dropdown box. 
-  * Click the "​**Options**"​-button to configure the communication parameters. 
-    * Select the PC's **COM-port** that the board is connected to. 
-    * Set the baudrate to **57600** bits/sec. 
- 
-Once you saved the settings by clicking the "​**OK**"​-button twice, you can close Microboot by clicking the "​**Cancel**"​-button on the main screen. Microboot is now ready for action! 
- 
-===== Building and downloading the Demo Program ===== 
 When using Freescale Codewarrior,​ simply open the project from within Codewarrior and select //​Project->​Make//​ from the menu. The project file is located at: \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Prog**\ide\ When using Freescale Codewarrior,​ simply open the project from within Codewarrior and select //​Project->​Make//​ from the menu. The project file is located at: \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Prog**\ide\
  
 The output file is The output file is
 +
   * \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Prog**\bin\**demoprog_evbplus_dragon12p.abs.sx**   * \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Prog**\bin\**demoprog_evbplus_dragon12p.abs.sx**
  
-To download ​this **demoprog_evbplus_dragon12p.abs.sx** ​file to the remaining flash memory ​using the bootloader, ​start the **Microboot** program ​and click the "​**Browse**"​-buttonBrowse to the "\Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Prog**\bin\" directory and select the **demoprog_evbplus_dragon12p.abs.sx** file to start the download+===== Firmware update procedure ===== 
 + 
 +To download ​the demo program \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\**Prog**\bin\**demoprog_evbplus_dragon12p.abs.sx** using the bootloader, ​follow ​the instructions in the following links, depending on the communication interface you intend to use: 
 + 
 +  ​[[manual:​rs232_demo|Firmware updates using the RS232 communication interface]] 
 +  ​[[manual:​can_demo|Firmware updates using the CAN communication interface]] 
 + 
 + 
 +===== Resolving Build Errors ===== 
 + 
 +When building the demo binaries for the first time, build errors might occur caused by CodeWarrior projects not correctly dealing with relative directories ​and having source-files in a project that have the same name as source-files in the library pathThese errors are quickly resolved by removing ​the file from the project and adding them again.  
 + 
 +Here is a list of encountered build errors and the solution of resolving the error: 
 + 
 +  * Could not open object file '.Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\Boot\ide\hcs12_Data\Standard\ObjectCode\datapage.c.o' 
 +    ​Delete the datapage.c ​file from the Boot\lib folder in the project and add it againThe source file is located at \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\Boot\lib
  
-{{:​manual:​demos:​evbplus_dragon12p_download.gif?|}}+  * Could not open object file '.Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\Boot\ide\hcs12_Data\Standard\ObjectCode\mc9s12dg256.c.o'​ 
 +    * Delete the mc9s12dg256.c file from the Boot\lib folder in the project and add it again. The source file is located at \Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\Boot\lib
  
-Once the download completed, ​the newly programmed software will be started by the bootloaderYou can verify this by checking that an LED blinks. Congratulations! That's all there is to using the bootloader.+  * Cannot open .\Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\Boot\ide\hcs12_Data\Standard\ObjectCode\cstartup.c.o 
 +    * Delete ​the cstartup.c file from the Source\HCS12\CodeWarrior folder in the project and add it againThe source file is located at \Target\Source\HCS12\CodeWarrior
  
 +  * Link error: Symbol AssertFailure in file .Target\Demo\HCS12_Evbplus_Dragon12p_CodeWarrior\Boot\ide\hcs12_Data\Standard\ObjectCode\main.c.o
 +    * Delete the assert.c file from the Source folder in the project and add it again. The source file is located at \Target\Source
manual/demos/evbplus_dragon12p_codewarrior.1381327100.txt.gz · Last modified: 2019/09/24 22:13 (external edit)