Skip to content

Commit

Permalink
Moved application to 0x8001000
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed May 7, 2019
1 parent 3c67368 commit d83d4d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion patch/bluepill.ld
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
MEMORY
{
/* Must sync with scripts/flash-app.ocd, repos/apache-mynewt-core/hw/bsp/bluepill/bsp.yml */
FLASH (rx) : ORIGIN = 0x08004000, LENGTH = 48K /* First image slot moved from 0x8008000 to 0x8004000. */
FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 60K /* First image slot moved from 0x8008000 to 0x8001000. */
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
}

Expand Down
10 changes: 5 additions & 5 deletions patch/bsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/bluepill/bluepill_debug.cmd"

bsp.flash_map:
areas:
# System areas in lower 64 KB ROM.
# Bootloader Stub and Application located in lower 64 KB ROM.
FLASH_AREA_BOOTLOADER:
device: 0
offset: 0x08000000
size: 16kB
size: 4kB
FLASH_AREA_IMAGE_0:
# Must sync with scripts/flash-app.ocd, repos/apache-mynewt-core/hw/bsp/bluepill/bluepill.ld
device: 0
offset: 0x08004000
size: 48kB
offset: 0x08001000
size: 60kB

# User areas in upper 64 KB ROM.
# Log and Filesystem located in upper 64 KB ROM.
FLASH_AREA_REBOOT_LOG:
user_id: 0
device: 0
Expand Down
4 changes: 2 additions & 2 deletions scripts/flash-app.ocd
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ echo ""

# Application address must sync with repos/apache-mynewt-core/hw/bsp/bluepill/bsp.yml
echo "Flashing Application to Blue Pill..."
flash write_image erase unlock bin/targets/bluepill_my_sensor/app/apps/my_sensor_app/my_sensor_app.img 0x08004000
flash verify_bank 0 bin/targets/bluepill_my_sensor/app/apps/my_sensor_app/my_sensor_app.img 0x4000
flash write_image erase unlock bin/targets/bluepill_my_sensor/app/apps/my_sensor_app/my_sensor_app.img 0x08001000
flash verify_bank 0 bin/targets/bluepill_my_sensor/app/apps/my_sensor_app/my_sensor_app.img 0x1000
echo ""

# Restart the device.
Expand Down

0 comments on commit d83d4d1

Please sign in to comment.