File tree 2 files changed +31
-2
lines changed
soc/riscv/riscv-privilege/telink_w91
2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,25 @@ jobs:
58
58
cd ..
59
59
west build -b tlsr9118bdk40d -d build_nvs_w91 zephyr/samples/subsys/nvs
60
60
61
+ - name : Build W91 bootloader/mcuboot/boot
62
+ run : |
63
+ cd ..
64
+ west build -b tlsr9118bdk40d -d build_mcuboot_w91 bootloader/mcuboot/boot/zephyr -- -DCONFIG_LOG_DEFAULT_LEVEL=3
65
+
66
+ - name : Build W91 basic/blinky for DFU
67
+ run : |
68
+ cd ..
69
+ west build -b tlsr9118bdk40d -d build_blinky_dfu_w91 zephyr/samples/basic/blinky -- -DCONFIG_BOOTLOADER_MCUBOOT=y
70
+
61
71
- name : Collect artifacts
62
72
run : |
63
73
mkdir telink_build_artifacts
64
74
cp ../build_blinky_w91/zephyr/zephyr.bin telink_build_artifacts/w91_blinky.bin
65
75
cp ../build_button_w91/zephyr/zephyr.bin telink_build_artifacts/w91_button.bin
66
76
cp ../build_mpu6050_w91/zephyr/zephyr.bin telink_build_artifacts/w91_mpu6050.bin
77
+ cp ../build_nvs_w91/zephyr/zephyr.bin telink_build_artifacts/w91_nvs.bin
78
+ cp ../build_mcuboot_w91/zephyr/zephyr.bin telink_build_artifacts/w91_mcuboot.bin
79
+ cp ../build_blinky_dfu_w91/zephyr/zephyr.signed.bin telink_build_artifacts/w91_blinky_dfu.signed.bin
67
80
68
81
- name : Publish artifacts
69
82
uses : actions/upload-artifact@v3
Original file line number Diff line number Diff line change 10
10
#include "soc.h"
11
11
12
12
#define N22_CORE_START (DT_REG_ADDR(DT_CHOSEN(zephyr_flash)) + DT_REG_SIZE(DT_CHOSEN(zephyr_flash)))
13
+ #define IPC_REMOTE_TX_START (DT_REG_ADDR(DT_N_NODELABEL_sram_rx))
14
+ #define IPC_REMOTE_TX_END (IPC_REMOTE_TX_START + DT_REG_SIZE(DT_N_NODELABEL_sram_rx))
13
15
14
16
.option push
15
17
.option norelax
@@ -23,16 +25,30 @@ reset_vector:
23
25
.global _start
24
26
.type _start,@function
25
27
26
- .word (0x31707848 ) #/ magic
28
+ #if !defined(CONFIG_BOOTLOADER_MCUBOOT)
29
+ .word (0x31707848 ) #/ magic
27
30
.word (0x33e90d91 ) #/ header crc32
28
31
.org 0x14
29
32
.word (0xa0000080 ) #/ start address
30
33
31
34
.org 0xa0
35
+ #endif
36
+
32
37
_start: #/ after reset starts on D25 core
33
38
39
+ lui t0, 0
40
+ la t2, IPC_REMOTE_TX_START
41
+ la t3, IPC_REMOTE_TX_END
42
+ _ZERO_IPC_REMOTE_TX_BEGIN:
43
+ bleu t3, t2, _start_n22
44
+ sw t0, 0 (t2)
45
+ addi t2, t2, 4
46
+ j _ZERO_IPC_REMOTE_TX_BEGIN
47
+
48
+ _start_n22:
49
+
34
50
lui t0, 0xf0100
35
- lui t1, %hi(N22_CORE_START)
51
+ lui t1, %hi(N22_CORE_START)
36
52
addi t1, t1, %lo(N22_CORE_START)
37
53
sw t1, 0x204 (t0) #/ N22 core address: 0xf0100204 <- N22_CORE_START
38
54
lui t0, 0xf1700
You can’t perform that action at this time.
0 commit comments