From 515c90053ed4a4de029fadc59847ff471b514e96 Mon Sep 17 00:00:00 2001 From: Axel Date: Sun, 18 Apr 2021 17:42:33 -0400 Subject: [PATCH 1/5] testing sam4 --- examples/zephyr-blink/platformio.ini | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/zephyr-blink/platformio.ini b/examples/zephyr-blink/platformio.ini index 2d327b3f..35d9867a 100644 --- a/examples/zephyr-blink/platformio.ini +++ b/examples/zephyr-blink/platformio.ini @@ -7,12 +7,17 @@ ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html -[env:zero] -platform = atmelsam -framework = zephyr -board = zero +; [env:zero] +; platform = atmelsam +; framework = zephyr +; board = zero [env:samd21_xpro] platform = atmelsam framework = zephyr board = samd21_xpro + +; [env:sam4e_xpro] +; platform = atmelsam +; framework = zephyr +; board = sam4e_xpro \ No newline at end of file From b995edc07a8896f9450e475abce1004f54861afd Mon Sep 17 00:00:00 2001 From: Axel Date: Sun, 18 Apr 2021 18:13:11 -0400 Subject: [PATCH 2/5] add sam4e_xpro board zephyr framework --- boards/sam4e_xpro.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 boards/sam4e_xpro.json diff --git a/boards/sam4e_xpro.json b/boards/sam4e_xpro.json new file mode 100644 index 00000000..a051fad0 --- /dev/null +++ b/boards/sam4e_xpro.json @@ -0,0 +1,26 @@ +{ + "build": { + "cpu": "cortex-m4", + "f_cpu": "120000000L", + "mcu": "sam4e16e", + "zephyr": { + "variant": "sam4e_xpro" + } + }, + "frameworks": [ + "zephyr" + ], + "name": "Atmel ATSAM4E-XPRO", + "upload": { + "maximum_ram_size": 128000, + "maximum_size": 1024000, + "protocol": "sam-ba", + "protocols": [ + "sam-ba", + "jlink", + "atmel-ice" + ] + }, + "url": "https://www.microchip.com/developmenttools/ProductDetails/ATSAM4E-XPRO", + "vendor": "Microchip" +} \ No newline at end of file From f60d68d2a95a2f22a79d82e6bad12ed91fe2c4d0 Mon Sep 17 00:00:00 2001 From: Axel Date: Sun, 18 Apr 2021 18:57:42 -0400 Subject: [PATCH 3/5] Update sam4e_xpro.json --- boards/sam4e_xpro.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/boards/sam4e_xpro.json b/boards/sam4e_xpro.json index a051fad0..a568a9ca 100644 --- a/boards/sam4e_xpro.json +++ b/boards/sam4e_xpro.json @@ -7,6 +7,15 @@ "variant": "sam4e_xpro" } }, + "debug": { + "jlink_device": "ATSAM4E16E", + "onboard_tools": [ + "cmsis-dap" + ], + "openocd_chipname": "atmel_sam4e_ek", + "openocd_target": "atmel_sam4e_ek", + "svd_path": "ATSAM4E16E.svd" + }, "frameworks": [ "zephyr" ], @@ -14,7 +23,6 @@ "upload": { "maximum_ram_size": 128000, "maximum_size": 1024000, - "protocol": "sam-ba", "protocols": [ "sam-ba", "jlink", From 65f4ec5359bba40426649838fb82114b2c9bc02d Mon Sep 17 00:00:00 2001 From: Axel Date: Sun, 18 Apr 2021 18:59:03 -0400 Subject: [PATCH 4/5] Update platformio.ini --- examples/zephyr-blink/platformio.ini | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/zephyr-blink/platformio.ini b/examples/zephyr-blink/platformio.ini index 35d9867a..a9391bf1 100644 --- a/examples/zephyr-blink/platformio.ini +++ b/examples/zephyr-blink/platformio.ini @@ -7,17 +7,17 @@ ; Please visit documentation for the other options and examples ; http://docs.platformio.org/page/projectconf.html -; [env:zero] -; platform = atmelsam -; framework = zephyr -; board = zero +[env:zero] +platform = atmelsam +framework = zephyr +board = zero [env:samd21_xpro] platform = atmelsam framework = zephyr board = samd21_xpro -; [env:sam4e_xpro] -; platform = atmelsam -; framework = zephyr -; board = sam4e_xpro \ No newline at end of file +[env:sam4e_xpro] +platform = atmelsam +framework = zephyr +board = sam4e_xpro \ No newline at end of file From ff08fb93d9363f73dcc59881e01d54394bd63d4e Mon Sep 17 00:00:00 2001 From: Axel Sepulveda Date: Fri, 8 Sep 2023 02:26:02 -0300 Subject: [PATCH 5/5] working zephyr board config --- boards/sam4e_xpro.json | 45 ++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/boards/sam4e_xpro.json b/boards/sam4e_xpro.json index a568a9ca..84679e25 100644 --- a/boards/sam4e_xpro.json +++ b/boards/sam4e_xpro.json @@ -1,34 +1,45 @@ { "build": { + "arduino": { + "ldscript": "flash.ld" + }, + "core": "adafruit", "cpu": "cortex-m4", + "extra_flags": "", "f_cpu": "120000000L", - "mcu": "sam4e16e", - "zephyr": { - "variant": "sam4e_xpro" - } + "hwids": [ + [ + "0x03EB", + "0x6124" + ] + ], + "mcu": "atsam4e16e", + "usb_product": "Atmel SAM4", + "variant": "generic_sam4E" }, "debug": { "jlink_device": "ATSAM4E16E", - "onboard_tools": [ - "cmsis-dap" - ], - "openocd_chipname": "atmel_sam4e_ek", - "openocd_target": "atmel_sam4e_ek", + "openocd_chipname": "atsam4E16E", + "openocd_target": "at91sam4XXX", "svd_path": "ATSAM4E16E.svd" - }, + }, "frameworks": [ "zephyr" ], "name": "Atmel ATSAM4E-XPRO", "upload": { - "maximum_ram_size": 128000, - "maximum_size": 1024000, + "disable_flushing": true, + "maximum_ram_size": 98304, + "maximum_size": 524288, + "native_usb": true, + "protocol": "sam-ba", "protocols": [ - "sam-ba", - "jlink", - "atmel-ice" - ] + "sam-ba" + ], + "require_upload_port": true, + "use_1200bps_touch": true, + "wait_for_upload_port": true }, "url": "https://www.microchip.com/developmenttools/ProductDetails/ATSAM4E-XPRO", "vendor": "Microchip" -} \ No newline at end of file +}