LinuxBoard4.x-uCBootloader

From VentureResearchWiki
Jump to navigation Jump to search

Overview[edit | edit source]

This bootloader resides in ROM and flashes an application starting at address 0xA000. The communication interface used is I2C.

Upon reset, depending on certain conditions, the bootloader exhibits the following behavior:

  • If application code is present, and application has set 'bootloader flag' in NVM, stay in bootloader for period of 10 seconds.
  • If application code is present, and application has NOT set 'bootloader flag' in NVM, stay in bootloader for period of 1 second.
  • If NO application code is present, stay in bootloader indefinitely.

Using the communication interface, pre-defined commands can be sent to query the uC if whether the bootloader or application code is currently executing.

These commands are outlined in 'M:\rfid_appliance\VRReader\docs\VR uC Command Interface.xlsx'.

Version History[edit | edit source]

  • 1.1: Added support to switch to FEI (default) clock mode before jumping to application
  • 1.0: Initial release

Programming Microcontroller Bootloader[edit | edit source]

  • Click the blue icon of a lightning bolt, which is the “Flash Programmer”.

LinuxBoard4.x BootLoader 1.png

  • Under Connection, click New…

NOTE: If this window already resembles the one in Step 5, continue from Step 5.

LinuxBoard4.x BootLoader 2.png

  • Under Name:, enter “Kinetis Connection”. Under Target, click New…

LinuxBoard4.x BootLoader 3.png

  • Enter the information as seen below.

For 'Initialization target', select the path as: (In this case, the user was ‘sam’, but this may vary between different PC’s.) C:\Users\sam\svn\projects\linuxboarduC\linuxboard4.x\Debugger\init_kinetis.tcl

LinuxBoard4.x BootLoader 4.png

Under the Memory tab, for 'Memory Configuration', select the path as: (In this case, the user was ‘sam’, but this may vary between different PC’s.)

C:\Users\sam\svn\projects\linuxboarduC\linuxboard4.x\Debugger\K20DX256M7.mem

LinuxBoard4.x BootLoader 5.png

  • Click Finish. Then, specify the File to Flash: (In this case, the user was ‘sam’, but this may vary between different PC’s.) C:\Users\sam\svn\projects\linuxboarduC_bootloader\vr_release\vr_embedded_bl_i2c_1.1.elf

LinuxBoard4.x BootLoader 6.png

  • Click Erase and Program. After a few moments, the console window should display "Program Command Succeeded".

LinuxBoard4.x BootLoader 7.png

  • Reset the microcontroller using the reset button.
  • Execute the following.
 opkg update && opkg install i2c-tools
  • Download the following script and execute. The result should follow. The reported version number should match the bold text in the 'Version History' above! The image below may be outdated.
 wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/vr/vr-ucbltest-i2c.sh -O /tmp/vr-ucbltest-i2c.sh
 sh /tmp/vr-ucbltest-i2c.sh version

LinuxBoard4.x BootLoader 8.png