Skip to content

Commit 363fdbd

Browse files
Karl Zhanggalak
Karl Zhang
authored andcommitted
arm: Musca B1: Migrate to eFlash
Musca B1 has 2 x 2MB embedded flash memories (eFlash). The flash memories are connected to the AHB Master Expansion “Code Interface”. Signed-off-by: Karl Zhang <[email protected]>
1 parent 0ea07d3 commit 363fdbd

File tree

4 files changed

+17
-27
lines changed

4 files changed

+17
-27
lines changed

boards/arm/v2m_musca_b1/doc/index.rst

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ The ARM Musca B1 test chip implements a Serial Configuration Control (SCC)
256256
register. The purpose of this register is to allow individual control of
257257
clocks, reset-signals and interrupts to peripherals, and pin-muxing.
258258

259-
QSPI boot memory
259+
Boot memory
260260
================
261261
Normal Musca-B1 test chip boot operation is from 4MB eFlash by default, and
262262
it offers the fastest boot method.
@@ -348,38 +348,28 @@ Follow the build steps for AN521 target while replacing the platform with
348348
``-DTARGET_PLATFORM=MUSCA_B1`` and compiler (if required) with ``-DCOMPILER=GNUARM``
349349

350350
Copy over tfm as a library to the Zephyr project source and create a shortcut
351-
for the secure veneers.
352-
353-
.. code-block:: bash
354-
355-
cp -r install/ $ZEPHYR_PROJECT/src/ext
356-
cp $ZEPHYR_PROJECT/src/ext/install/export/tfm/veneers/s_veneers.o $ZEPHYR_PROJECT/src/ext
357-
358-
359-
Build the Zephyr app in the usual way.
351+
for the secure veneers and necessary header files. All files are in the install
352+
folder after TF-M built.
360353

361354
Uploading an application to V2M Musca B1
362355
----------------------------------------
363356

364357
Applications must be converted to Intel's hex format before being flashed to a
365358
V2M Musca B1. An optional bootloader can be prepended to the image.
366-
The QSPI flash base address alias is 0x0.
367-
359+
The QSPI flash base address alias is 0x0, and the eFlash base address alias is
360+
0xA000000.
368361
The image offset is calculated by adding the flash offset to the
369362
bootloader partition size.
370363

371-
A third-party tool (srecord) is used to generate the Intel formatted hex image. For more information
372-
refer to the `Srecord Manual`_.
364+
A third-party tool (srecord) is used to generate the Intel formatted hex image.
365+
For more information refer to the `Srecord Manual`_.
373366

374367
.. code-block:: bash
375368
376-
srec_cat $BIN_BOOLOADER -Binary -offset $QSPI_FLASH_OFFSET $BIN_SNS -Binary -offset $IMAGE_OFFSET -o $HEX_FLASHABLE -Intel
377-
378-
# For a 64K bootloader IMAGE_OFFSET = $QSPI_FLASH_OFFSET + 0x10000
379-
srec_cat $BIN_BOOLOADER -Binary -offset 0x0 $BIN_SNS -Binary -offset 0x10000 -o $HEX_FLASHABLE -Intel
369+
srec_cat $BIN_BOOLOADER -Binary -offset $FLASH_OFFSET $BIN_SNS -Binary -offset $IMAGE_OFFSET -o $HEX_FLASHABLE -Intel
380370
381-
# For a 256K bootloader IMAGE_OFFSET = $QSPI_FLASH_OFFSET + 0x40000
382-
srec_cat $BIN_BOOLOADER -Binary -offset 0x0 $BIN_SNS -Binary -offset 0x40000 -o $HEX_FLASHABLE -Intel
371+
# For a 128K bootloader IMAGE_OFFSET = $FLASH_OFFSET + 0x20000
372+
srec_cat $BIN_BOOLOADER -Binary -offset 0xA000000 $BIN_SNS -Binary -offset 0xA020000 -o $HEX_FLASHABLE -Intel
383373
384374
Connect the V2M Musca B1 to your host computer using the USB port. You should
385375
see a USB connection exposing a Mass Storage (MUSCA_B) and a USB Serial Port.

boards/arm/v2m_musca_b1/v2m_musca_b1.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
};
4040
};
4141

42-
flash0: flash@10000000 {
43-
/* QSPI flash */
44-
reg = <0x10000000 0x2000000>;
42+
flash0: flash@1a000000 {
43+
/* Embedded flash */
44+
reg = <0x1a000000 0x200000>;
4545
};
4646

4747
sram0: memory@30000000 {

boards/arm/v2m_musca_b1/v2m_musca_b1_nonsecure.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
};
4040
};
4141

42-
flash0: flash@30400 {
43-
/* QSPI flash */
44-
reg = <0x00030400 0x1fcfc00>;
42+
flash0: flash@0a060400 {
43+
/* Embedded flash */
44+
reg = <0x0a060400 0x19fc00>;
4545
};
4646

4747
sram0: memory@20070000 {

boards/arm/v2m_musca_b1/v2m_musca_b1_nonsecure.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ toolchain:
77
- gnuarmemb
88
- xtools
99
ram: 64
10-
flash: 32575
10+
flash: 1663

0 commit comments

Comments
 (0)