mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
Use PX4_FLASH_BASE from micro HAL
This commit is contained in:
committed by
Lorenz Meier
parent
a2fa199a26
commit
94450eb43a
@@ -104,8 +104,8 @@ bl_update_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if ((hdr[0] < 0x20000000) || /* stack not below RAM */
|
if ((hdr[0] < 0x20000000) || /* stack not below RAM */
|
||||||
(hdr[0] > (0x20000000 + (128 * 1024))) || /* stack not above RAM */
|
(hdr[0] > (0x20000000 + (128 * 1024))) || /* stack not above RAM */
|
||||||
(hdr[1] < 0x08000000) || /* entrypoint not below flash */
|
(hdr[1] < PX4_FLASH_BASE) || /* entrypoint not below flash */
|
||||||
((hdr[1] - 0x08000000) > 16384)) { /* entrypoint not outside bootloader */
|
((hdr[1] - PX4_FLASH_BASE) > BL_FILE_SIZE_LIMIT)) { /* entrypoint not outside bootloader */
|
||||||
free(buf);
|
free(buf);
|
||||||
errx(1, "not a bootloader image");
|
errx(1, "not a bootloader image");
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ bl_update_main(int argc, char *argv[])
|
|||||||
sched_lock();
|
sched_lock();
|
||||||
|
|
||||||
const size_t page = 0;
|
const size_t page = 0;
|
||||||
uint8_t *base = (uint8_t *) STM32_FLASH_BASE;
|
uint8_t *base = (uint8_t *) PX4_FLASH_BASE;
|
||||||
|
|
||||||
ssize_t size = up_progmem_erasepage(page);
|
ssize_t size = up_progmem_erasepage(page);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user