diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-12-09 22:47:33 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-12-09 22:47:33 +0300 |
commit | 14db90f06f74494ee811cf1ae4f12190756ed2ca (patch) | |
tree | c5c8332e39db09a5df8c4475cfc03e184ed46016 /src/Duet3_V06 | |
parent | bf7be88b40ee5b48aacd4d78917cfaa94f7aa3d2 (diff) |
Support loading IAP in RAM
Support loading IAP in RAM instead of flash, to make more flash memory available for the main firmware
Diffstat (limited to 'src/Duet3_V06')
-rw-r--r-- | src/Duet3_V06/Pins_Duet3_V06.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/Duet3_V06/Pins_Duet3_V06.h b/src/Duet3_V06/Pins_Duet3_V06.h index 668cfd6e..3a95749d 100644 --- a/src/Duet3_V06/Pins_Duet3_V06.h +++ b/src/Duet3_V06/Pins_Duet3_V06.h @@ -7,7 +7,22 @@ const size_t NumFirmwareUpdateModules = 1; #define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin" -#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin" + +#define IAP_IN_RAM 0 + +#if IAP_IN_RAM +# define IAP_UPDATE_FILE "Duet3iap_sd_ram_" BOARD_SHORT_NAME ".bin" +constexpr uint32_t IAP_IMAGE_START = 0x20450000; // last 64kb of RAM +#else +# define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin" + +// SAME70 Flash locations +// These are designed to work with 1Mbyte flash processors as well as 2Mbyte +// We can only erase complete 128kb sectors on the SAME70, so we allow 128Kb for IAP +constexpr uint32_t IAP_IMAGE_START = 0x004E0000; +constexpr uint32_t IAP_IMAGE_END = 0x004FFFFF; +#endif + // Features definition #define HAS_LWIP_NETWORKING 1 @@ -262,12 +277,6 @@ constexpr unsigned int NumNamedPins = ARRAY_SIZE(PinTable); // Function to look up a pin name pass back the corresponding index into the pin table bool LookupPinName(const char *pn, LogicalPin& lpin, bool& hardwareInverted); -// SAME70 Flash locations -// These are designed to work with 1Mbyte flash processors as well as 2Mbyte -// We can only erase complete 128kb sectors on the SAME70, so we allow 128Kb for IAP -constexpr uint32_t IAP_FLASH_START = 0x004E0000; -constexpr uint32_t IAP_FLASH_END = 0x004FFFFF; - // Duet pin numbers for the Linux interface constexpr Pin LinuxTfrReadyPin = PortEPin(2); Spi * const LinuxSpi = SPI1; |