Skip to content

Commit 95ba876

Browse files
authored
Merge branch 'ArmDeveloperEcosystem:main' into gcohen_go_gc
2 parents ef8a7b0 + 091f118 commit 95ba876

45 files changed

Lines changed: 4525 additions & 241 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ on:
99
type: string
1010
aws-region:
1111
description: "AWS Region to use for fetching credentials"
12-
required: false
12+
required: true
1313
type: string
14-
default: "us-west-2"
1514
deploy-role-arn:
1615
description: "AWS OIDC role ARN to assume"
17-
required: false
16+
required: true
1817
type: string
19-
default: ""
2018
secrets:
21-
AWS_OIDC_ROLE:
22-
required: false
2319
HUGO_LLM_API:
2420
required: true
2521
HUGO_RAG_API:
@@ -64,20 +60,10 @@ jobs:
6460
- name: Install Post-CSS
6561
run: npm install postcss-cli
6662

67-
- name: Validate AWS OIDC role
68-
run: |
69-
if [ -z "$DEPLOY_ROLE_ARN" ] && [ -z "$AWS_OIDC_ROLE" ]; then
70-
printf '%s\n' "Either the deploy-role-arn input or AWS_OIDC_ROLE secret must be provided." >&2
71-
exit 1
72-
fi
73-
env:
74-
DEPLOY_ROLE_ARN: ${{ inputs.deploy-role-arn }}
75-
AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE }}
76-
7763
- name: AWS Github OIDC Login
7864
uses: aws-actions/configure-aws-credentials@v6
7965
with:
80-
role-to-assume: ${{ inputs.deploy-role-arn || secrets.AWS_OIDC_ROLE }}
66+
role-to-assume: ${{ inputs.deploy-role-arn }}
8167
aws-region: ${{ inputs.aws-region }}
8268

8369
# Builds arm-software-developer repo

.github/workflows/main.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow will be triggered on a push to the 'main' branch automatically or when called manually.
2-
# Upon running this workflow, the website will be built and deployed to the internal instance.
3-
name: Build and Deploy Internal Website
2+
# Upon running this workflow, the website will be built and deployed to the dev instance.
3+
name: Build and Deploy Dev Website
44

55
on:
66
# Runs on pushes to the 'main' branch
@@ -11,25 +11,8 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
# Deprecated: kept temporarily while the dev deployment is validated.
15-
build_and_deploy_internal:
16-
name: Build and Deploy Internal
17-
uses: ./.github/workflows/deploy.yml
18-
permissions:
19-
id-token: write
20-
contents: read
21-
with:
22-
target: internal
23-
secrets:
24-
AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE_INTERNAL }}
25-
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
26-
HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }}
27-
HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }}
28-
HUGO_PHI_ONNX_LLM_API: ${{ secrets.HUGO_PHI_ONNX_LLM_API }}
29-
HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }}
30-
HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }}
31-
3214
build_and_deploy_dev:
15+
if: github.repository == 'ArmDeveloperEcosystem/arm-learning-paths'
3316
name: Build and Deploy Dev
3417
uses: ./.github/workflows/deploy.yml
3518
permissions:

.github/workflows/production.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
# Deprecated: kept temporarily while the prod deployment is validated.
15-
build_and_deploy_production:
16-
name: Build and Deploy Production Deprecated
17-
uses: ./.github/workflows/deploy.yml
18-
permissions:
19-
id-token: write
20-
contents: read
21-
with:
22-
target: production
23-
secrets:
24-
AWS_OIDC_ROLE: ${{ secrets.AWS_OIDC_ROLE_PRODUCTION }}
25-
HUGO_LLM_API: ${{ secrets.HUGO_LLM_API }}
26-
HUGO_RAG_API: ${{ secrets.HUGO_RAG_API }}
27-
HUGO_AUDIO_API: ${{ secrets.HUGO_AUDIO_API }}
28-
HUGO_PHI_ONNX_LLM_API: ${{ secrets.HUGO_PHI_ONNX_LLM_API }}
29-
HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID: ${{ secrets.HUGO_DEV_PROG_SIGNIUP_FORM_MUNCHKIN_ID }}
30-
HUGO_FORM_ID_FOR_PROGRAM_SIGNUP: ${{ secrets.HUGO_FORM_ID_FOR_PROGRAM_SIGNUP }}
31-
3214
build_and_deploy_prod:
3315
name: Build and Deploy Prod
3416
uses: ./.github/workflows/deploy.yml

.github/workflows/spell-and-link-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
jobs:
1212
spell_and_link_check:
13+
if: github.repository == 'ArmDeveloperEcosystem/arm-learning-paths' || github.event_name == 'workflow_dispatch'
1314
runs-on: ubuntu-latest
1415

1516
steps:

config.toml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,11 @@ enableGitInfo = true
88
enableRobotsTXT = true
99

1010
[deployment]
11-
[[deployment.targets]]
12-
name = "internal-existing"
13-
URL = "s3://armswdev.tk?region=us-east-1"
14-
cloudFrontDistributionID = "E2VDQ2CYZATMO9"
15-
16-
# Deprecated: kept temporarily while the dev deployment is validated.
17-
[[deployment.targets]]
18-
name = "internal"
19-
URL = "s3://arm-learning-paths-internal?region=us-west-2"
20-
cloudFrontDistributionID = "ENN4LK1IZUDIX"
21-
2211
[[deployment.targets]]
2312
name = "dev"
2413
URL = "s3://arm-learning-paths-dev?region=us-east-1"
2514
cloudFrontDistributionID = "EAMKPMDBM18II"
2615

27-
# Deprecated: kept temporarily while the prod deployment is validated.
28-
[[deployment.targets]]
29-
name = "production"
30-
URL = "s3://arm-learning-paths?region=us-west-2"
31-
cloudFrontDistributionID = "E2NEF61QWPFRIH"
32-
3316
[[deployment.targets]]
3417
name = "prod"
3518
URL = "s3://arm-learning-paths-prod?region=us-east-1"

content/learning-paths/embedded-and-microcontrollers/zephyr_cs320_mps4/how-to-2.md

Lines changed: 35 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ The files you modify or create are:
4949

5050
```
5151
boards/arm/mps4/
52-
├── board.yml # Board metadata (modify)
53-
├── Kconfig # Board Kconfig entry (modify)
54-
├── Kconfig.defconfig # Default Kconfig settings (modify)
55-
├── mps4_corstone320_fpga_defconfig # Board defconfig fragment (new)
56-
├── mps4_corstone320_fpga.dts # Device tree source (new)
57-
└── mps4_common_soc_peripheral_fpga.dtsi # SoC peripheral definitions (new)
52+
├── board.yml # Board metadata (modify)
53+
├── Kconfig.mps4 # Board Kconfig entry (modify)
54+
├── Kconfig.defconfig # Default Kconfig settings (modify)
55+
├── mps4_corstone320_fpga_defconfig # Board defconfig fragment (new)
56+
├── mps4_corstone320_fpga.dts # Device tree source (new)
57+
└── mps4_common_soc_peripheral_fpga.dtsi # SoC peripheral definitions (new)
5858
```
5959

6060
## Add the board files
@@ -192,64 +192,31 @@ Create `boards/arm/mps4/mps4_corstone320_fpga.dts` with the following content:
192192

193193
This file defines the SoC peripherals for the MPS4 FPGA build and is included by `mps4_corstone320_fpga.dts`. It is not a standalone file — the `.dts` file pulls it in during compilation with `#include`.
194194

195-
Create `boards/arm/mps4/mps4_common_soc_peripheral_fpga.dtsi` with the following content. This configures the 25 MHz peripheral clock, GPIO controllers, and two UART instances using the MPS4 peripheral addresses from the [SSE-320 FPGA Image for MPS4 Application Note](https://developer.arm.com/documentation/109762/0100/?lang=en):
195+
Create `boards/arm/mps4/mps4_common_soc_peripheral_fpga.dtsi` with the following content. This configures the 50 MHz peripheral clock and two UART instances using the MPS4 peripheral addresses from the [SSE-320 FPGA Image for MPS4 Application Note](https://developer.arm.com/documentation/109762/0100/?lang=en):
196196

197197
```dts
198198
sysclk: system-clock {
199199
compatible = "fixed-clock";
200-
clock-frequency = <25000000>;
200+
clock-frequency = <50000000>;
201201
#clock-cells = <0>;
202202
};
203203
204-
gpio0: gpio@100000 {
205-
compatible = "arm,cmsdk-gpio";
206-
reg = <0x100000 0x1000>;
207-
interrupts = <69 3>;
208-
gpio-controller;
209-
#gpio-cells = <2>;
204+
uart0: uart@9303000 {
205+
compatible = "arm,cmsdk-uart";
206+
reg = <0x9303000 0x1000>;
207+
interrupts = <34 3 49 3>;
208+
interrupt-names = "tx", "rx";
209+
clocks = <&sysclk>;
210+
current-speed = <115200>;
210211
};
211212
212-
gpio1: gpio@101000 {
213-
compatible = "arm,cmsdk-gpio";
214-
reg = <0x101000 0x1000>;
215-
interrupts = <70 3>;
216-
gpio-controller;
217-
#gpio-cells = <2>;
218-
};
219-
220-
uart0: uart@8203000 {
221-
compatible = "arm,cmsdk-uart";
222-
reg = <0x8203000 0x1000>;
223-
interrupts = <34 3 33 3>;
224-
interrupt-names = "tx", "rx";
225-
clocks = <&sysclk>;
226-
current-speed = <115200>;
227-
};
228-
229-
uart1: uart@8204000 {
230-
compatible = "arm,cmsdk-uart";
231-
reg = <0x8204000 0x1000>;
232-
interrupts = <36 3 35 3>;
233-
interrupt-names = "tx", "rx";
234-
clocks = <&sysclk>;
235-
current-speed = <115200>;
236-
};
237-
238-
gpio_led0: mps4_fpgaio@8202000 {
239-
compatible = "arm,mmio32-gpio";
240-
reg = <0x8202000 0x4>;
241-
gpio-controller;
242-
#gpio-cells = <1>;
243-
ngpios = <8>;
244-
};
245-
246-
gpio_button: mps4_fpgaio@8202008 {
247-
compatible = "arm,mmio32-gpio";
248-
reg = <0x8202008 0x4>;
249-
gpio-controller;
250-
#gpio-cells = <1>;
251-
ngpios = <2>;
252-
direction-input;
213+
uart1: uart@9304000 {
214+
compatible = "arm,cmsdk-uart";
215+
reg = <0x9304000 0x1000>;
216+
interrupts = <36 3 35 3>;
217+
interrupt-names = "tx", "rx";
218+
clocks = <&sysclk>;
219+
current-speed = <115200>;
253220
};
254221
255222
pinctrl: pinctrl {
@@ -258,19 +225,6 @@ pinctrl: pinctrl {
258225
};
259226
```
260227

261-
### Kconfig
262-
263-
`Kconfig` is the board-level Kconfig entry. It selects the SoC variant and configures board-level options based on the board target you pass to `west build`.
264-
265-
The existing `boards/arm/mps4/Kconfig` already handles the FVP variants. Add the FPGA variant by appending the `select SOC_CORSTONE320` line so the file looks like this:
266-
267-
```kconfig
268-
config BOARD_MPS4
269-
select BUILD_WITH_TFM if BOARD_MPS4_CORSTONE315_FVP_NS || BOARD_MPS4_CORSTONE320_FVP_NS
270-
select TRUSTED_EXECUTION_NONSECURE if BOARD_MPS4_CORSTONE315_FVP_NS || BOARD_MPS4_CORSTONE320_FVP_NS
271-
select USE_DT_CODE_PARTITION if BOARD_MPS4_CORSTONE315_FVP_NS || BOARD_MPS4_CORSTONE320_FVP_NS
272-
select SOC_CORSTONE320 if BOARD_MPS4_CORSTONE320_FPGA
273-
```
274228

275229
### Kconfig.defconfig
276230

@@ -311,6 +265,18 @@ endif
311265
endif
312266
```
313267

268+
### Kconfig.mps4
269+
270+
`Kconfig.mps4` is the base software configuration for selecting SoC and other board and SoC related settings. Add the FPGA support in the file.
271+
272+
```
273+
config BOARD_MPS4
274+
select SOC_SERIES_MPS4
275+
select SOC_MPS4_CORSTONE315 if BOARD_MPS4_CORSTONE315_FVP || BOARD_MPS4_CORSTONE315_FVP_NS
276+
select SOC_MPS4_CORSTONE320 if BOARD_MPS4_CORSTONE320_FVP || BOARD_MPS4_CORSTONE320_FVP_NS || BOARD_MPS4_CORSTONE320_FPGA
277+
```
278+
279+
314280
### mps4_corstone320_fpga_defconfig
315281
316282
`mps4_corstone320_fpga_defconfig` is a Kconfig fragment that Zephyr merges into the final `.config` when building for this board target. It enables TrustZone, MPU support, GPIO, and console over UART, and configures the build as a Secure image with ROM-region relocation.
@@ -336,4 +302,4 @@ CONFIG_TRUSTED_EXECUTION_SECURE=y
336302
CONFIG_ROMSTART_RELOCATION_ROM=y
337303
```
338304

339-
After creating all these files, you're ready to build the `hello_world` sample for your new board target.
305+
After creating all these files, you're ready to build the `hello_world` sample for your new board target.

content/learning-paths/embedded-and-microcontrollers/zephyr_cs320_mps4/how-to-3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Replace the path with your actual toolchain directory. On x86_64, the directory
2828
From the `~/zephyrproject/zephyr` directory, build the `hello_world` example for the Corstone-320 FPGA variant:
2929

3030
```bash
31-
west build -p always -b mps4/corstone320/fpga samples/hello_world
31+
west build -p always -b mps4/corstone320/fpga zephyr/samples/hello_world -- -DCONFIG_ROMSTART_RELOCATION_ROM=y
3232
```
3333

3434
A successful build ends with output similar to:
@@ -62,8 +62,8 @@ The ELF image contains the application and the Zephyr kernel libraries. You can
6262
For the hello_world application, place the vector table in the FPGA boot ROM at address `0x11000000`, and place the remaining code and data in SRAM at address `0x31000000`. Use `arm-none-eabi-objcopy` to extract these two regions from `zephyr.elf`:
6363

6464
```bash
65-
arm-none-eabi-objcopy -O binary --only-section=.vectors build/zephyr/zephyr.elf vector.bin
66-
arm-none-eabi-objcopy -O binary --remove-section=.vectors build/zephyr/zephyr.elf app.bin
65+
arm-none-eabi-objcopy -O binary --only-section=rom_start zephyr.elf vector.bin
66+
arm-none-eabi-objcopy -O binary --remove-section=rom_start zephyr.elf app.bin
6767
```
6868

6969
Update `images.txt` under `/MB/HBI0376B/FI101` to load the two images. The paths use the `\SOFTWARE\` folder on the MPS4 SD card, which is where you will copy the binary files:

0 commit comments

Comments
 (0)