User Tools

Site Tools


faq

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
faq [2024/02/15 14:39]
voorburg
faq [2024/02/15 14:43] (current)
voorburg
Line 145: Line 145:
 This is where the backdoor entry comes in to save the day. The backdoor allows the bootloader to be entered and activated, regardless of the user program. The default implementation keeps the backdoor open for typically 50ms after reset. Although this time depends on the used communication interface. When a new programming sequence is started with the Microboot download utility, it continuously attempts to establish a connection with OpenBLT. If OpenBLT cannot be reactivated by the user program, simply reset the microcontroller and Microboot automatically connects and activates OpenBLT during the time windows that the backdoor is open. This is where the backdoor entry comes in to save the day. The backdoor allows the bootloader to be entered and activated, regardless of the user program. The default implementation keeps the backdoor open for typically 50ms after reset. Although this time depends on the used communication interface. When a new programming sequence is started with the Microboot download utility, it continuously attempts to establish a connection with OpenBLT. If OpenBLT cannot be reactivated by the user program, simply reset the microcontroller and Microboot automatically connects and activates OpenBLT during the time windows that the backdoor is open.
  
-This implementation is user-friendly and does not depend on any additional hardware. The only downside is that the startup of the user program is always delayed by the backdoor open time window (BOOT_BACKDOOR_ENTRY_TIMEOUT_MS). In case this delay is not acceptable, OpenBLT can be easily reconfigured to allow for an alternative backdoor entry implementation. For example, one that always keeps the bootloader active depending on the state of a digital input upon microcontroller reset. To implement your own backdoor entry through hook functions, change the BOOT_BACKDOOR_HOOKS_ENABLE configurable to 1 in file blt_conf.h.+This implementation is user-friendly and does not depend on any additional hardware. The only downside is that the startup of the user program is always delayed by the backdoor open time window (''​BOOT_BACKDOOR_ENTRY_TIMEOUT_MS''​). In case this delay is not acceptable, OpenBLT can be easily reconfigured to allow for an alternative backdoor entry implementation. For example, one that always keeps the bootloader active depending on the state of a digital input upon microcontroller reset. To implement your own backdoor entry through hook functions, change the ''​BOOT_BACKDOOR_HOOKS_ENABLE'' ​configurable to ''​1'' ​in file blt_conf.h.
  
 **__How do I change the communication interface?​__** ​ \\  **__How do I change the communication interface?​__** ​ \\ 
  
-The configuration interface used by OpenBLT is configured in file blt_conf.h through the configurables BOOT_COM_XXX_ENABLE,​ where XXX specifies the communication interface, such as RS232 or CAN.+The configuration interface used by OpenBLT is configured in file blt_conf.h through the configurables ​''​BOOT_COM_XXX_ENABLE''​, where XXX specifies the communication interface, such as RS232 or CAN.
  
 Thanks to OpenBLT'​s flexible architecture,​ new communication interfaces can be added. [[http://​www.feaser.com|Feaser]] offers engineering services to add functionality to support any communication interface you desire. For example USB or TCP/IP. It is even possible for OpenBLT to load the new user program image from an SD-card. ​ Thanks to OpenBLT'​s flexible architecture,​ new communication interfaces can be added. [[http://​www.feaser.com|Feaser]] offers engineering services to add functionality to support any communication interface you desire. For example USB or TCP/IP. It is even possible for OpenBLT to load the new user program image from an SD-card. ​
Line 155: Line 155:
 **__How can I disable the assertions?​__** ​ \\  **__How can I disable the assertions?​__** ​ \\ 
  
-By default, both compile-time (ASSERT_CT) and run-time assertions (ASSERT_RT) are enabled. Think of them as safeguards and debugging aids when you are modifying the bootloader. There is nothing wrong with leaving assertions on all the time, as they protect against incorrect configuration and behavior of the bootloader.+By default, both compile-time (''​ASSERT_CT''​) and run-time assertions (''​ASSERT_RT''​) are enabled. Think of them as safeguards and debugging aids when you are modifying the bootloader. There is nothing wrong with leaving assertions on all the time, as they protect against incorrect configuration and behavior of the bootloader.
  
 Some user prefer to differentiate between a debug version and a release version of their bootloader, where the release version disables the assertions. Disabling the assertions in OpenBLT is quite easy. All you have to do is define the **NDEBUG** macro. Ideally, you add it as a compiler flag. With GCC this would be “-DNDEBUG”. Alternatively,​ you can add the following line at the top of assert.h: Some user prefer to differentiate between a debug version and a release version of their bootloader, where the release version disables the assertions. Disabling the assertions in OpenBLT is quite easy. All you have to do is define the **NDEBUG** macro. Ideally, you add it as a compiler flag. With GCC this would be “-DNDEBUG”. Alternatively,​ you can add the following line at the top of assert.h:
  
-<​code>​+<​code ​c>
 #define NDEBUG #define NDEBUG
 </​code>​ </​code>​
Line 171: Line 171:
 **__How can I use 29-bit extended CAN identifiers instead of 11-bit standard?​__** ​ \\  **__How can I use 29-bit extended CAN identifiers instead of 11-bit standard?​__** ​ \\ 
  
-The bootloader uses two CAN identifiers. One for sending command messages from the host and one for receiving response messages. These identifers are configured in blt_confg.h with the macros BOOT_COM_CAN_RX_MSG_ID and BOOT_COM_CAN_TX_MSG_ID,​ respectively. Simply OR the identifier with bitmask 0x80000000 to configure the identifier as 29-bit extended. More details can be found at the bottom of this [[https://​www.feaser.com/​en/​blog/?​p=63|blog article]]. ​+The bootloader uses two CAN identifiers. One for sending command messages from the host and one for receiving response messages. These identifers are configured in blt_confg.h with the macros ​''​BOOT_COM_CAN_RX_MSG_ID'' ​and ''​BOOT_COM_CAN_TX_MSG_ID''​, respectively. Simply OR the identifier with bitmask ​''​0x80000000'' ​to configure the identifier as 29-bit extended. More details can be found at the bottom of this [[https://​www.feaser.com/​en/​blog/?​p=63|blog article]]. ​
  
 **__Can I add functionality for programming an extra non-volatile memory device?​__** ​ \\  **__Can I add functionality for programming an extra non-volatile memory device?​__** ​ \\ 
Line 187: Line 187:
 **__Can I change the checksum mechanism myself?​__** ​ \\  **__Can I change the checksum mechanism myself?​__** ​ \\ 
  
-By setting the configuration macro BOOT_NVM_CHECKSUM_HOOKS_ENABLE to 1 in blt_conf.h, hook functions become available (NvmWriteChecksumHook() and NvmVerifyChecksumHook()) that allow you to implement your own checksum mechanism. Some customers prefer the checksum to not be just a marker for user program presence, but a checksum over the entire user program. For this, you could add checksum information to the firmware'​s S-record in a post-build step at a fixed (reserved) address, such as the first and last addresses and the actual checksum. The newly available hook functions can then access this checksum information to perform a full checksum verification.+By setting the configuration macro ''​BOOT_NVM_CHECKSUM_HOOKS_ENABLE'' ​to ''​1'' ​in blt_conf.h, hook functions become available (''​NvmWriteChecksumHook()'' ​and ''​NvmVerifyChecksumHook()''​) that allow you to implement your own checksum mechanism. Some customers prefer the checksum to not be just a marker for user program presence, but a checksum over the entire user program. For this, you could add checksum information to the firmware'​s S-record in a post-build step at a fixed (reserved) address, such as the first and last addresses and the actual checksum. The newly available hook functions can then access this checksum information to perform a full checksum verification.
  
 **__During a firmware update, is the firmware first downloaded to RAM?​__** ​ \\  **__During a firmware update, is the firmware first downloaded to RAM?​__** ​ \\ 
Line 201: Line 201:
   - As the last programming step, a checksum value is programmed into flash memory at a fixed location. This is not a checksum of the entire firmware, but typically just a checksum of the vector table. It serves as a marker to determine if the firmware was completely programmed or not.   - As the last programming step, a checksum value is programmed into flash memory at a fixed location. This is not a checksum of the entire firmware, but typically just a checksum of the vector table. It serves as a marker to determine if the firmware was completely programmed or not.
   - Once done, the new software program is started after performing a checksum verification.   - Once done, the new software program is started after performing a checksum verification.
- 
  
  
  
faq.txt · Last modified: 2024/02/15 14:43 by voorburg