Hi
1) I think that you will need the project
uTaskerBoot (the bare-minium one). This is in fact only about four files
uTaskerBootLoader.c
M5223X_boot.c
mcf5223X_boot.sflash_config.s (or
flash_config_sec.s if the FLASH is to be protected - but to be used extremely carefully...)
Otherwise it doesn't contain anything from the OS etc. (just the Flash drivers really). You can strip out some defines for other processors but it is not really necessary. The project define
_M5223X ensures that only the relevant parts for this processor are used.
This is completely independent of the code that will run as application (the application just needs to be linked to the correct address and not try to use interrupt vectors of its own from SRAM).
Note that the "Bare-minimum" loader doesn't need to be integrated into any other projects.
2) When you copy the data to SPI Flash you need to save it to the correct location and ensure that it has a small header (used to verify its length and checksum etc.). As long as this is correct (you can calculate and save it as part of your storage function) you don't need to use any conversion programs.
uTaskerConvert.exe will add a suitable header to a binary file, but is not necessarily appropriate if you are transfering as SREC.
3) There are several method to generate an SREC with boot loader and application in one file:
- load boot loader and application seperately (eg using CW7.x as described in the M522XX boot loader document) to the board: Now read back the content and store as a single REC (or binary) file, which now includes the complete contents.
- Use a convertion utility to combine the two files. There are a lots of free utilities of working with SREC file on the Internet. The uTasker utilities can also do such things but I think that it only supports saving as .ihex format (due to this requirement in the NXP projects).
4) The serial loader project can be used as stand-alone or back-up solution. Again it doesn't need to be integrated into any project since it is a complete stand-alone project - it just needs to be configured to know which address the application starts on and how big the largest applicatin can be (or is allowed to be). I would look at
http://www.utasker.com/docs/uTasker/uTaskerSecureSREC.pdf to get an idea of the possibility of working with the bare-minumum boot loader and a secondary boot loader (this allows maximum flexibility) but is probably not really needed according to your requirements (I still think that you can load the bare-minimum loader, combined with your existing project [linked at the correct offset or course] and you are in fact already more or less finished.
To be sure that the specific question have been answered:
- What can we strip out of the uTaskerBootCW7.0.mcp project to leave us with a bare-bones routine which only checks SPI Flash and either upgrades or continues to the main app?
The boot-loader project is already stripped to a minimum so there is nothing that can be removed (or needs to be removed). It will be less that 2k in size when working with only the FLASH memory driver or a bit larger than 2k when working with SPI Flash since it then needs both FLASH and SPI Flash drivers at the same time.
- How do I build the uTaskerBoot project to give me code I can include in my main project without using uTaskerConvert.exe?
The code can be combined with your application (using CW7, simply download the project to your board and then download you application and that was it).
uTaskerConvert.exe has nothing to do with the boot loader - it is only used to prepare a new application that is then suitable for downloading as binary (usually via USB or Ethernet).
- How do I modify my existing project to include the compiled uTaskerBoot code? I understand modifying the start address in the project_FLASH.lcf as per the PDF:
[flash (RX) : ORIGIN = 0x0001000, LENGTH = 0x0003F000]
Is there some way to automatically include & place the bootloader code before the main app?
There is no need to include the code in youir project. The shift in the reset vector is correct in your application so that it follows the boot loader in physical FLASH at the correct location (it must start at a new FLASH SECTOR boundary and can not be contiguous to it in memory - otherwise the boot loader would delete itself when deleting the start of the application area). Simply download the two projects one after the other from CW7 when developing and then use an SREC combining utility to make a single SREC containing the two images for the factory later.
Good luck
Regards
Mark