Skip to content

Commit 4be73cc

Browse files
Merge pull request #382 from tim-weller-wolfssl/rt1060-updates
Update RT1060 example to support MIMXRT1060-EVKB board with SDK 2.13.1
2 parents ccfd909 + b13220c commit 4be73cc

4 files changed

Lines changed: 133 additions & 44 deletions

File tree

RT1060/MIMXRT1062xxxxx_flexspi_nor.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ SECTIONS
4545
. = ALIGN(4);
4646
} > m_flash_config
4747

48-
ivt_begin= ORIGIN(m_flash_config) + LENGTH(m_flash_config);
48+
ivt_begin = ORIGIN(m_flash_config) + LENGTH(m_flash_config);
4949

5050
.ivt : AT(ivt_begin)
5151
{

RT1060/Makefile

Lines changed: 56 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,17 @@
1-
SDK?=./SDK-2.8.2_EVK-MIMXRT1060
1+
#SDK?=./SDK_2_8_2_EVK-MIMXRT1060
2+
SDK?=./SDK_2_13_1_MIMXRT1060-EVKB
23
WOLFSSL?=../../wolfssl
34

4-
CC=arm-none-eabi-gcc
5-
5+
# Common settings and files
66
ASMFLAGS=-D__STARTUP_CLEAR_BSS -D__STARTUP_INITIALIZE_NONCACHEDATA -mcpu=cortex-m7 -Wall -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99
7-
CFLAGS=-DXIP_EXTERNAL_FLASH=1 -DXIP_BOOT_HEADER_ENABLE=1 -DCPU_MIMXRT1062DVL6A -DPRINTF_FLOAT_ENABLE=1 -DSCANF_FLOAT_ENABLE=1 -DPRINTF_ADVANCED_ENABLE=1 -DSCANF_ADVANCED_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -Os -mcpu=cortex-m7 -Wall -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb -MMD -MP -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99 -DXPRINTF=PRINTF
8-
LDFLAGS= -mcpu=cortex-m7 -Wall -mfloat-abi=hard -mfpu=fpv5-d16 --specs=nosys.specs -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker -Map=output.map -T MIMXRT1062xxxxx_flexspi_nor.ld -static -lm -lc -lnosys
9-
107
CFLAGS+=-I$(SDK)/devices/MIMXRT1062/utilities/debug_console/
118
CFLAGS+=-I$(SDK)/components/serial_manager -I$(SDK)/components/uart/
129
CFLAGS+=-I$(SDK) -I$(SDK)/devices/MIMXRT1062/drivers/ -I$(SDK)/devices/MIMXRT1062 -I$(SDK)/CMSIS/Include
1310
CFLAGS+=-I$(SDK)/devices/MIMXRT1062/utilities/str
1411
CFLAGS+=-I. -I$(WOLFSSL)
15-
1612
CFLAGS+=-DWOLFSSL_USER_SETTINGS
17-
18-
19-
OBJS=common.o board.o pin_mux.o dcd.o clock_config.o $(SDK)/devices/MIMXRT1062/gcc/startup_MIMXRT1062.o $(SDK)/devices/MIMXRT1062/system_MIMXRT1062.o \
20-
$(SDK)/devices/MIMXRT1062/drivers/fsl_clock.o \
21-
$(SDK)/devices/MIMXRT1062/drivers/fsl_trng.o \
22-
$(SDK)/devices/MIMXRT1062/drivers/fsl_common.o \
23-
$(SDK)/devices/MIMXRT1062/utilities/debug_console/fsl_debug_console.o \
24-
$(SDK)/devices/MIMXRT1062/utilities/str/fsl_str.o \
25-
$(SDK)/components/uart/lpuart_adapter.o \
26-
$(SDK)/components/serial_manager/serial_manager.o \
27-
$(SDK)/components/lists/generic_list.o \
28-
$(SDK)/components/serial_manager/serial_port_uart.o \
29-
$(SDK)/devices/MIMXRT1062/drivers/fsl_lpuart.o \
30-
$(SDK)/devices/MIMXRT1062/utilities/fsl_assert.o \
31-
$(SDK)/devices/MIMXRT1062/drivers/fsl_gpio.o \
32-
$(SDK)/devices/MIMXRT1062/xip/fsl_flexspi_nor_boot.o \
33-
$(SDK)/boards/evkmimxrt1060/xip/evkmimxrt1060_flexspi_nor_config.o \
34-
$(SDK)/devices/MIMXRT1062/utilities/fsl_sbrk.o
35-
36-
OBJS+= \
13+
LDFLAGS=-mcpu=cortex-m7 -Wall -mfloat-abi=hard -mfpu=fpv5-d16 --specs=nosys.specs -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker -Map=output.map -static -lm -lc -lnosys
14+
OBJS= \
3715
$(WOLFSSL)/wolfcrypt/src/wc_port.o \
3816
$(WOLFSSL)/wolfcrypt/src/wc_encrypt.o \
3917
$(WOLFSSL)/wolfcrypt/src/random.o \
@@ -59,6 +37,57 @@ OBJS+= \
5937
$(WOLFSSL)/wolfcrypt/src/wolfmath.o \
6038
$(WOLFSSL)/wolfcrypt/src/fe_low_mem.o
6139

40+
# Board/SDK specific settings and files
41+
ifeq ($(SDK),./SDK_2_8_2_EVK-MIMXRT1060)
42+
43+
CFLAGS+=-DXIP_EXTERNAL_FLASH=1 -DXIP_BOOT_HEADER_ENABLE=1 -DCPU_MIMXRT1062DVL6A -DPRINTF_FLOAT_ENABLE=1 -DSCANF_FLOAT_ENABLE=1 -DPRINTF_ADVANCED_ENABLE=1 -DSCANF_ADVANCED_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -Os -mcpu=cortex-m7 -Wall -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb -MMD -MP -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99 -DXPRINTF=PRINTF
44+
LDFLAGS+=-T MIMXRT1062xxxxx_flexspi_nor.ld
45+
OBJS+=common.o board.o pin_mux.o dcd.o clock_config.o $(SDK)/devices/MIMXRT1062/gcc/startup_MIMXRT1062.o $(SDK)/devices/MIMXRT1062/system_MIMXRT1062.o \
46+
$(SDK)/devices/MIMXRT1062/drivers/fsl_clock.o \
47+
$(SDK)/devices/MIMXRT1062/drivers/fsl_trng.o \
48+
$(SDK)/devices/MIMXRT1062/drivers/fsl_common.o \
49+
$(SDK)/devices/MIMXRT1062/utilities/debug_console/fsl_debug_console.o \
50+
$(SDK)/devices/MIMXRT1062/utilities/str/fsl_str.o \
51+
$(SDK)/components/uart/lpuart_adapter.o \
52+
$(SDK)/components/serial_manager/serial_manager.o \
53+
$(SDK)/components/lists/generic_list.o \
54+
$(SDK)/components/serial_manager/serial_port_uart.o \
55+
$(SDK)/devices/MIMXRT1062/drivers/fsl_lpuart.o \
56+
$(SDK)/devices/MIMXRT1062/utilities/fsl_assert.o \
57+
$(SDK)/devices/MIMXRT1062/drivers/fsl_gpio.o \
58+
$(SDK)/devices/MIMXRT1062/xip/fsl_flexspi_nor_boot.o \
59+
$(SDK)/boards/evkmimxrt1060/xip/evkmimxrt1060_flexspi_nor_config.o \
60+
$(SDK)/devices/MIMXRT1062/utilities/fsl_sbrk.o
61+
62+
else ifeq ($(SDK),./SDK_2_13_1_MIMXRT1060-EVKB)
63+
64+
CFLAGS+=-DXIP_EXTERNAL_FLASH=1 -DXIP_BOOT_HEADER_ENABLE=1 -DCPU_MIMXRT1062DVL6A -DWOLFSSL_IMXRT_DCP -DDCP_USE_DCACHE=0 -DWOLFSSL_USER_SETTINGS -DPRINTF_FLOAT_ENABLE=1 -DSCANF_FLOAT_ENABLE=1 -DPRINTF_ADVANCED_ENABLE=1 -DSCANF_ADVANCED_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -DMCUXPRESSO_SDK -Os -mcpu=cortex-m7 -Wall -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb -MMD -MP -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -mapcs -std=gnu99 -DXPRINTF=PRINTF
65+
CFLAGS+=-I$(SDK)/CMSIS/Core/Include
66+
CFLAGS+=-DDCP_USE_DCACHE=0
67+
LDFLAGS+=-T MIMXRT1062xxxxx_flexspi_nor.ld
68+
OBJS+=common.o board.o pin_mux.o dcd.o clock_config.o \
69+
$(SDK)/boards/evkbmimxrt1060/xip/evkbmimxrt1060_flexspi_nor_config.o \
70+
$(SDK)/components/uart/fsl_adapter_lpuart.o \
71+
$(SDK)/components/serial_manager/fsl_component_serial_manager.o \
72+
$(SDK)/components/lists/fsl_component_generic_list.o \
73+
$(SDK)/components/serial_manager/fsl_component_serial_port_uart.o \
74+
$(SDK)/devices/MIMXRT1062/gcc/startup_MIMXRT1062.o \
75+
$(SDK)/devices/MIMXRT1062/xip/fsl_flexspi_nor_boot.o \
76+
$(SDK)/devices/MIMXRT1062/system_MIMXRT1062.o \
77+
$(SDK)/devices/MIMXRT1062/drivers/fsl_lpuart.o \
78+
$(SDK)/devices/MIMXRT1062/drivers/fsl_clock.o \
79+
$(SDK)/devices/MIMXRT1062/drivers/fsl_trng.o \
80+
$(SDK)/devices/MIMXRT1062/drivers/fsl_common.o \
81+
$(SDK)/devices/MIMXRT1062/drivers/fsl_gpio.o \
82+
$(SDK)/devices/MIMXRT1062/drivers/fsl_cache.o \
83+
$(SDK)/devices/MIMXRT1062/utilities/debug_console/fsl_debug_console.o \
84+
$(SDK)/devices/MIMXRT1062/utilities/str/fsl_str.o \
85+
$(SDK)/devices/MIMXRT1062/utilities/fsl_assert.o \
86+
$(SDK)/devices/MIMXRT1062/utilities/fsl_sbrk.o
87+
88+
endif
89+
90+
# Other settings and files
6291
ifneq ($(DCP),0)
6392
OBJS+= \
6493
$(SDK)/devices/MIMXRT1062/drivers/fsl_dcp.o \

RT1060/README.md

Lines changed: 76 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,89 @@
1-
Building wolfCrypt benchmark on i.MX RT1060-EVK
1+
The examples for NXP i.MXRT1060 support the MMIMXRT1060-EVKB and the MMIMXRT1060-EVK boards.
22

3-
1. Go to https://mcuxpresso.nxp.com and download the SDK archive for RT1060 - version 2.8.2
3+
Building and running the examples
4+
====
45

5-
2. Unpack the SDK archive into `./SDK-2.8.2_EVK-MIMXRT1060`
6+
Set up the NXP MCUXpresso SDK
7+
----
68

7-
3. Download latest wolfSSL (e.g. clone via `git clone git@github.com:wolfssl/wolfssl.git`) in the same directory as `wolfssl-examples`
9+
- Use the NXP _MCUXpresso SDK Builder_ available from NXP (https://mcuxpresso.nxp.com) to generate the SDK choosing:
810

9-
4. Ensure that a recent arm-gcc toolchain is installed and reachable from your path. A recent toolchain can be obtained from:
10-
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm
11+
- _Required Toolchains_: `GCC ARM Embedded`
1112

12-
5. Clone this repository
13+
For **MIMXRT1060-EVKB**:
14+
- _Development Board_: `MIMXRT1060-EVKB (IMXRT1062xxxxA)`
15+
- _Version_: `2.13.1`
1316

14-
6. Enter the repository directory and run `make`
17+
For **EVK-IMXRT1060**:
18+
- _Development Board_: `EVK-MIMXRT1060 (IMXRT1062xxxxA)`
19+
- _Version_: `2.8.2`
1520

16-
7. Connect the RT1060-EVK to the computer via the OpenSDA USB port (L23)
21+
- Download the generated SDK archive and unpack it into:
1722

18-
8. Copy either `wolfcrypt-test.bin` or `wolfcrypt-benchmark.bin` to the storage device associated to the RT1060-EVK
23+
For **MIMXRT1060-EVKB**:
24+
- `wolfssl-examples/RT1060/SDK_2_13_1_MIMXRT1060-EVKB`
1925

20-
9. Open a terminal console emulator and connect it to the port associated to the RT1060-RVK (e.g. `/dev/ttyACM0`)
26+
For **EVK-MIMXRT1060**:
27+
- `wolfssl-examples/RT1060/SDK_2_8_2_EVK-MIMXRT1060`
2128

22-
10. Reset the board to start the test or benchmark and read the result on the terminal console
29+
Set up ARM cross-compilation tools
30+
----
2331

32+
- Ensure that a recent arm-gcc toolchain is installed and reachable via the `CC` environment variable.
2433

25-
Benchmark results are also available in the file [results.md](results.md)
34+
- A recent toolchain can be obtained from ARM (https://developer.arm.com)
2635

36+
- Example: `CC=arm-none-eabi-gcc`
37+
38+
Set up wolfSSL
39+
----
40+
41+
- In the same directory as `wolfssl-examples` (i.e. the parent directory):
42+
43+
```
44+
$ git clone git@github.com:wolfssl/wolfssl.git
45+
```
46+
47+
Build wolfSSL
48+
----
49+
50+
- In the `wolfssl-examples/RT1060` directory:
51+
52+
- For **MIMXRT1060-EVKB**:
53+
54+
```
55+
$ SDK=SDK_2_13_1_MIMXRT1060-EVKB make
56+
```
57+
58+
- For **EVK-MIMXRT106**:
59+
60+
61+
```
62+
$ SDK=SDK_2_8_2_EVK-MIMXRT1060 make
63+
```
64+
65+
The resulting binary files will be in `wolfssl-examples/RT1060`:
66+
67+
- `wolfcrypt-test.bin` - wolfCrypt crytography test
68+
69+
- `wolfcrypt-benchmark.bin` - wolfCrypt cryptography benchmark
70+
71+
Download and run the built wolfSSL examples
72+
----
73+
74+
- Connect the board to the host computer via the debug port
75+
76+
- Copy a wolfSSL example binary file to the storage device associated with the board
77+
78+
- Wait for the board to flash the image and reset
79+
80+
- Open a terminal console emulator and connect it to the port associated with the board, e.g. `/dev/ttyACM0`
81+
82+
- Reset the board. The wolfSSL example output will display in the terminal console
83+
84+
Notes
85+
====
86+
87+
- EVK-MIMXRT1060 benchmark results are also available in the file [results.md](results.md)
88+
89+
- MIMXRT1060-EVKB example developed using _arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)_ on _Ubuntu 22.04LTS_ host

RT1060/SDK-2.8.2_EVK-MIMXRT1060/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)