Skip to content

Commit 9916a1a

Browse files
committed
treewide: improve Obelix board build strategy
Add 4 board variants: - EVT and BB - DVT and BB2 Each variant will report a different code in firmware metadata. In the release process (or CI), only EVT/DVT are built. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
1 parent 7751838 commit 9916a1a

14 files changed

Lines changed: 36 additions & 21 deletions

File tree

.github/workflows/build-firmware.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
strategy:
2828
matrix:
29-
board: ["snowy_bb2", "spalding_bb2", "silk_bb2", "asterix", "obelix", "obelix_bb", "obelix_bb2"]
29+
board: ["snowy_bb2", "spalding_bb2", "silk_bb2", "asterix", "obelix_evt", "obelix_dvt"]
3030

3131
steps:
3232
- name: Mark Github workspace as safe

.github/workflows/build-prf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
strategy:
2626
matrix:
27-
board: ["asterix", "obelix", "obelix_bb", "obelix_bb2"]
27+
board: ["asterix", "obelix_evt", "obelix_dvt"]
2828
mode: ["normal", "mfg"]
2929

3030
steps:

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787

8888
strategy:
8989
matrix:
90-
board: ["asterix", "obelix", "obelix_bb2"]
90+
board: ["asterix", "obelix_evt", "obelix_dvt"]
9191

9292
steps:
9393
- name: Mark Github workspace as safe
@@ -169,7 +169,7 @@ jobs:
169169

170170
strategy:
171171
matrix:
172-
board: ["asterix", "obelix", "obelix_bb2"]
172+
board: ["asterix", "obelix_evt", "obelix_dvt"]
173173
slot: [0, 1]
174174

175175
exclude:
@@ -211,7 +211,7 @@ jobs:
211211
- name: Set slot suffix
212212
id: slot_suffix
213213
run: |
214-
NEEDS_SUFFIX="obelix obelix_bb2"
214+
NEEDS_SUFFIX="obelix_evt obelix_dvt"
215215
216216
if echo $NEEDS_SUFFIX | grep -wq "${{ matrix.board }}"; then
217217
echo "SLOT_SUFFIX=_slot${{ matrix.slot }}" >> "$GITHUB_OUTPUT"
@@ -292,7 +292,7 @@ jobs:
292292

293293
- name: Merge slot-specific pbz files
294294
run: |
295-
NEEDS_MERGE="obelix obelix_bb2"
295+
NEEDS_MERGE="obelix_evt obelix_dvt"
296296
297297
mkdir artifacts-merged
298298
for board in $NEEDS_MERGE; do

platform/platform_capabilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
},
342342
},
343343
{
344-
'boards': [ 'obelix', 'obelix_bb', 'obelix_bb2' ],
344+
'boards': [ 'obelix_evt', 'obelix_dvt', 'obelix_bb', 'obelix_bb2' ],
345345
'capabilities':
346346
{
347347
'HAS_APP_GLANCES',

platform/wscript

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def is_asterix(ctx):
4747
def is_obelix(ctx):
4848
return ctx.get_board().startswith('obelix')
4949

50+
@conf
51+
def is_obelix_dvt(ctx):
52+
return ctx.get_board().startswith('obelix_dvt')
53+
5054
@conf
5155
def is_obelix_bb2(ctx):
5256
return ctx.get_board().startswith('obelix_bb2')

src/fw/board/board_definitions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
#include "boards/board_robert.h" // prototypes for Robert EVT
6666
#elif BOARD_ASTERIX
6767
#include "boards/board_asterix.h"
68-
#elif BOARD_OBELIX || BOARD_OBELIX_BB || BOARD_OBELIX_BB2
68+
#elif BOARD_OBELIX_EVT || BOARD_OBELIX_DVT || BOARD_OBELIX_BB || BOARD_OBELIX_BB2
6969
#include "boards/board_obelix.h"
7070
#else
7171
#error "Unknown board definition"

src/fw/board/boards/board_obelix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static PwmState s_pwm1_ch3_state = {
115115
.channel = 3,
116116
};
117117

118-
#if !BOARD_OBELIX_BB2
118+
#if !BOARD_OBELIX_DVT && !BOARD_OBELIX_BB2
119119
const LedControllerPwm LED_CONTROLLER_PWM = {
120120
.pwm = {
121121
[0] = {
@@ -233,7 +233,7 @@ static DisplayJDIDevice s_display = {
233233
.flags = PIN_NOPULL,
234234
},
235235
},
236-
#if BOARD_OBELIX_BB2
236+
#if BOARD_OBELIX_DVT || BOARD_OBELIX_BB2
237237
.vddp = {hwp_gpio1, 28, true},
238238
.vlcd = {hwp_gpio1, 29, true},
239239
#endif

src/fw/board/boards/board_obelix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extern I2CSlavePort *const I2C_W1160;
4040
extern I2CSlavePort *const I2C_AW2016;
4141
extern const Npm1300Config NPM1300_CONFIG;
4242
extern const BoardConfigActuator BOARD_CONFIG_VIBE;
43-
#if !BOARD_OBELIX_BB2
43+
#if !BOARD_OBELIX_DVT && !BOARD_OBELIX_BB2
4444
extern const LedControllerPwm LED_CONTROLLER_PWM;
4545
#endif
4646
extern PwmConfig *const PWM1_CH1;

src/fw/board/display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ typedef struct {
7979
#include "displays/display_silk.h"
8080
#elif BOARD_ASTERIX
8181
#include "displays/display_silk.h"
82-
#elif BOARD_OBELIX || BOARD_OBELIX_BB || BOARD_OBELIX_BB2
82+
#elif BOARD_OBELIX_EVT || BOARD_OBELIX_DVT || BOARD_OBELIX_BB || BOARD_OBELIX_BB2
8383
#include "displays/display_obelix.h"
8484
#elif BOARD_CUTTS_BB
8585
#include "displays/display_snowy.h"

src/fw/board/splash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#pragma once
1818

19-
#if BOARD_OBELIX || BOARD_OBELIX_BB || BOARD_OBELIX_BB2
19+
#if BOARD_OBELIX_EVT || BOARD_OBELIX_DVT || BOARD_OBELIX_BB || BOARD_OBELIX_BB2
2020
#include "splash/splash_obelix.xbm"
2121
#else
2222
#error "Unknown splash definition for board"
23-
#endif // BOARD_*
23+
#endif // BOARD_*

0 commit comments

Comments
 (0)