Skip to content

Commit cdf2013

Browse files
committed
boards: add portenta c33
1 parent a94bb93 commit cdf2013

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed

boards.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,3 +472,66 @@ niclasense.debug.server.openocd.scripts.0=interface/{programmer.protocol}.cfg
472472
niclasense.debug.server.openocd.scripts.1={programmer.transport_script}
473473
niclasense.debug.server.openocd.scripts.2=target/nrf52.cfg
474474
niclasense.debug.cortex-debug.custom.request=attach
475+
476+
477+
##########################################################################################
478+
479+
portentac33.name=Portenta C33
480+
portentac33.build.core=arduino
481+
portentac33.build.crossprefix=arm-zephyr-eabi-
482+
portentac33.build.compiler_path={runtime.tools.arm-zephyr-eabi-0.16.8.path}/bin/
483+
484+
portentac33.menu.debug.false=Standard
485+
portentac33.menu.debug.true=Debug
486+
487+
portentac33.menu.debug.false.post_build_arg=
488+
portentac33.menu.debug.true.post_build_arg=debug
489+
490+
portentac33.build.variant=arduino_portenta_c33
491+
portentac33.build.mcu=cortex-m33
492+
portentac33.build.fpu=-mfpu=fpv5-sp-d16
493+
portentac33.build.architecture=cortex-m33
494+
portentac33.compiler.zephyr.arch.define=
495+
496+
portentac33.build.board={build.variant}
497+
498+
portentac33.build.float-abi=-mfloat-abi=hard
499+
portentac33.build.extra_flags=
500+
portentac33.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
501+
portentac33.build.board=arduino_portenta_c33
502+
portentac33.build.extra_ldflags=
503+
portentac33.compiler.zephyr.arch.define=
504+
portentac33.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=122880 -DNDEBUG -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
505+
portentac33.compiler.zephyr.ldflags=-fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit
506+
portentac33.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop --specs=picolibc.specs -D_POSIX_THREADS -mlong-calls -nodefaultlibs
507+
portentac33.compiler.zephyr.cxxflags={compiler.zephyr.ldflags} -fdata-sections -ffunction-sections -fno-unwind-tables -fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop --specs=picolibc.specs -D_POSIX_THREADS -mlong-calls -nodefaultlibs
508+
portentac33.compiler.zephyr.includes={build.variant.path}/includes.txt
509+
portentac33.compiler.zephyr.extra_ldflags=-lstdc++ -lsupc++ -lnosys -nostdlib
510+
portentac33.compiler.zephyr=
511+
portentac33.vid.0=0x2341
512+
portentac33.pid.0=0x0068
513+
portentac33.upload_port.0.vid=0x2341
514+
portentac33.upload_port.0.pid=0x0068
515+
portentac33.upload.target=portentac33
516+
517+
portentac33.upload.tool=dfu-util
518+
portentac33.upload.tool.default=dfu-util
519+
portentac33.upload.protocol=
520+
portentac33.upload.transport=
521+
portentac33.upload.vid=0x2341
522+
portentac33.upload.pid=0x0368
523+
portentac33.upload.interface=1
524+
portentac33.upload.use_1200bps_touch=true
525+
portentac33.upload.wait_for_upload_port=false
526+
portentac33.upload.native_usb=true
527+
portentac33.upload.maximum_size=1966080
528+
portentac33.upload.maximum_data_size=523624
529+
portentac33.upload.address=0x100000
530+
portentac33.upload.dfuse=-Q
531+
532+
portentac33.bootloader.tool=dfu-util
533+
portentac33.bootloader.tool.default=dfu-util
534+
portentac33.bootloader.file=zephyr-arduino_portenta_c33.bin
535+
portentac33.bootloader.interface=0
536+
portentac33.bootloader.address=0x10000
537+
portentac33.bootloader.dfuse=-Q
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include <zephyr/kernel.h>
2+
3+
#define BSP_PRV_PRCR_KEY (0xA500U)
4+
#define BSP_PRV_PRCR_PRC1_UNLOCK ((BSP_PRV_PRCR_KEY) | 0x2U)
5+
#define BSP_PRV_PRCR_LOCK ((BSP_PRV_PRCR_KEY) | 0x0U)
6+
7+
#define BOOT_DOUBLE_TAP_DATA (*((volatile uint32_t *) &R_SYSTEM->VBTBKR[0]))
8+
#define DOUBLE_TAP_MAGIC 0x07738135
9+
10+
void _on_1200_bps() {
11+
R_SYSTEM->PRCR = (uint16_t) BSP_PRV_PRCR_PRC1_UNLOCK;
12+
BOOT_DOUBLE_TAP_DATA = DOUBLE_TAP_MAGIC;
13+
R_SYSTEM->PRCR = (uint16_t) BSP_PRV_PRCR_LOCK;
14+
NVIC_SystemReset();
15+
}

variants/arduino_portenta_c33/variant.h

Whitespace-only changes.

0 commit comments

Comments
 (0)