-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use image_builder in armv7m4 based projects
JIRA: CI-494
- Loading branch information
Showing
4 changed files
with
64 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
flash0: | ||
# internal flash - 2 banks 512 kB - assume the target image can't exceed one bank | ||
size: 0x80000 # 512 kB | ||
block_size: 0x100 # program page size | ||
padding_byte: 0xff | ||
partitions: | ||
- name: plo | ||
offs: 0x0 | ||
- name: user | ||
offs: 0xc800 | ||
# if size not set - last non-virtual partition will be extnded to the end of flash | ||
|
||
# virtual offset [user.offs] + [user.script.size] | ||
- name: kernel | ||
offs: 0xd000 | ||
virtual: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
size: 0x200 | ||
is_relative: False | ||
|
||
contents: | ||
# NOTE: All data/code maps need to be cacheable to allow unaligned accesses | ||
# env.BOOT_DEVICE should correspond to one of the map names | ||
- map flash0 0x08000000 0x08080000 rxcb | ||
- map flash1 0x08080000 0x08100000 rxcb | ||
- map ram 0x20000000 0x20050000 rwxcb | ||
- map io 0x40000000 0x60000000 rw | ||
- map otp 0x1fff0000 0x20000000 rw | ||
- phfs flash0 2.0 raw | ||
- phfs flash1 2.1 raw | ||
- phfs ramdev 4.0 raw | ||
- console 0.1 | ||
- if: '{{ not(env.RAM_SCRIPT) | default(false) }}' | ||
action: call | ||
set_base: True | ||
device: '{{ env.BOOT_DEVICE }}' | ||
filename: user.plo | ||
offset: '{{ nvm[env.BOOT_DEVICE].user.offs }}' | ||
target_magic: '{{ env.MAGIC_USER_SCRIPT }}' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# kernel + initrd | ||
magic: '{{ env.MAGIC_USER_SCRIPT }}' | ||
size: '{{ nvm.flash0.kernel.offs - nvm.flash0.user.offs }}' # 0x800 but ensure we're consistent with NVM config | ||
is_relative: True | ||
|
||
contents: | ||
- kernelimg {{ env.BOOT_DEVICE }} | ||
- app {{ env.BOOT_DEVICE }} -x stm32l4-multi {{ env.BOOT_DEVICE }} ram;io;otp | ||
- app {{ env.BOOT_DEVICE }} -x psh {{ env.BOOT_DEVICE }} ram | ||
- wait 2000 | ||
- go! |