From 3c2036a57795c883e1bbfcc89aaadef783f8ed4c Mon Sep 17 00:00:00 2001 From: Victor <> Date: Thu, 23 Dec 2021 13:37:21 +0100 Subject: [PATCH 01/14] Added enhanced name updated toolchain version --- boards.txt | 4 ++-- platform.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boards.txt b/boards.txt index 55037861..2708af7c 100644 --- a/boards.txt +++ b/boards.txt @@ -1,5 +1,5 @@ -arduino_due_x_dbg.name=Arduino Due (Programming Port) +arduino_due_x_dbg.name=Arduino Due Enhanced (Programming Port) arduino_due_x_dbg.vid.0=0x2341 arduino_due_x_dbg.pid.0=0x003d arduino_due_x_dbg.vid.1=0x2A03 @@ -23,7 +23,7 @@ arduino_due_x_dbg.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a arduino_due_x_dbg.build.vid=0x2341 arduino_due_x_dbg.build.pid=0x003e -arduino_due_x.name=Arduino Due (Native USB Port) +arduino_due_x.name=Arduino Due Enhanced (Native USB Port) arduino_due_x.vid.0=0x2341 arduino_due_x.pid.0=0x003e arduino_due_x.vid.1=0x2A03 diff --git a/platform.txt b/platform.txt index 5a330240..d3b68297 100644 --- a/platform.txt +++ b/platform.txt @@ -17,7 +17,7 @@ compiler.warning_flags.default= compiler.warning_flags.more=-Wall compiler.warning_flags.all=-Wall -Wextra -compiler.path={runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path}/bin/ +compiler.path={runtime.tools.arm-none-eabi-gcc-10.3-2021.10.path}/bin/ compiler.c.cmd=arm-none-eabi-gcc compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD compiler.c.elf.cmd=arm-none-eabi-gcc From fe23ca6c37a4787e7fae39f765145cabaf228c6a Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 23 Dec 2021 15:34:56 +0100 Subject: [PATCH 02/14] added first support for Serial 4 (i.e., USART2) --- cores/arduino/UARTClass.cpp | 26 +++++++++++++++++++++++++- cores/arduino/UARTClass.h | 7 ++++++- variants/arduino_due_x/variant.cpp | 20 ++++++++++++++++++-- variants/arduino_due_x/variant.h | 5 +++-- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/cores/arduino/UARTClass.cpp b/cores/arduino/UARTClass.cpp index 36de1358..4ac877a5 100644 --- a/cores/arduino/UARTClass.cpp +++ b/cores/arduino/UARTClass.cpp @@ -66,6 +66,18 @@ void UARTClass::init(const uint32_t dwBaudRate, const uint32_t modeReg) // Configure interrupts _pUart->UART_IDR = 0xFFFFFFFF; _pUart->UART_IER = UART_IER_RXRDY | UART_IER_OVRE | UART_IER_FRAME; + + /* + Originally USART2 is used as ADC. + Override this configuration if user has initialized USART2 (serial4) + This means that the ADC functionality will no longer work + TODO: Restore functionality when calling End + */ + if((Usart*)_pUart == USART2) + { + PIOB->PIO_ABSR = (0x0u); + PIOD->PIO_ABSR = PIO_ABSR_P4 | PIO_ABSR_P5; + } // Enable UART interrupt in NVIC NVIC_EnableIRQ(_dwIrq); @@ -172,7 +184,14 @@ void UARTClass::IrqHandler( void ) // Did we receive data? if ((status & UART_SR_RXRDY) == UART_SR_RXRDY) - _rx_buffer->store_char(_pUart->UART_RHR); + { + uint8_t uart_rx_frame=_pUart->UART_RHR; + _rx_buffer->store_char(uart_rx_frame); + if(pRx_irq_cb != nullptr) + { + pRx_irq_cb(uart_rx_frame,rx_irq_args); + } + } // Do we need to keep sending data? if ((status & UART_SR_TXRDY) == UART_SR_TXRDY) @@ -196,3 +215,8 @@ void UARTClass::IrqHandler( void ) } } +void UARTClass::attachRxIrq(rx_irq_cb cb,void * args) +{ + pRx_irq_cb = cb; + rx_irq_args = args; +} diff --git a/cores/arduino/UARTClass.h b/cores/arduino/UARTClass.h index 3747d8be..a85fc384 100644 --- a/cores/arduino/UARTClass.h +++ b/cores/arduino/UARTClass.h @@ -59,7 +59,10 @@ class UARTClass : public HardwareSerial uint32_t getInterruptPriority(); void IrqHandler(void); - + typedef void (*rx_irq_cb)(uint8_t frame,void * args); + + void attachRxIrq(rx_irq_cb cb,void * args); + operator bool() { return true; }; // UART always active protected: @@ -69,6 +72,8 @@ class UARTClass : public HardwareSerial RingBuffer *_tx_buffer; Uart* _pUart; + rx_irq_cb pRx_irq_cb; + void * rx_irq_args; IRQn_Type _dwIrq; uint32_t _dwId; diff --git a/variants/arduino_due_x/variant.cpp b/variants/arduino_due_x/variant.cpp index 7a0de80a..9a51026c 100644 --- a/variants/arduino_due_x/variant.cpp +++ b/variants/arduino_due_x/variant.cpp @@ -286,12 +286,12 @@ extern const PinDescription g_APinDescription[]= { PIOA, PIO_PA1A_CANRX0|PIO_PA0A_CANTX0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // 91 - CAN1 all pins { PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, - + // 92 - USART2 (Serial4) all pins + { PIOB, PIO_PB20A_TXD2|PIO_PB21A_RXD2, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // END { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER } } ; - uint8_t g_pinStatus[PINS_COUNT] = {0}; #ifdef __cplusplus @@ -321,9 +321,11 @@ void UART_Handler(void) RingBuffer rx_buffer2; RingBuffer rx_buffer3; RingBuffer rx_buffer4; +RingBuffer rx_buffer5; RingBuffer tx_buffer2; RingBuffer tx_buffer3; RingBuffer tx_buffer4; +RingBuffer tx_buffer5; USARTClass Serial1(USART0, USART0_IRQn, ID_USART0, &rx_buffer2, &tx_buffer2); void serialEvent1() __attribute__((weak)); @@ -334,6 +336,9 @@ void serialEvent2() { } USARTClass Serial3(USART3, USART3_IRQn, ID_USART3, &rx_buffer4, &tx_buffer4); void serialEvent3() __attribute__((weak)); void serialEvent3() { } +USARTClass Serial4(USART2, USART2_IRQn, ID_USART2, &rx_buffer5, &tx_buffer5); +void serialEvent4() __attribute__((weak)); +void serialEvent4() { } // IT handlers void USART0_Handler(void) @@ -351,6 +356,11 @@ void USART3_Handler(void) Serial3.IrqHandler(); } +void USART2_Handler(void) +{ + Serial4.IrqHandler(); +} + // ---------------------------------------------------------------------------- void serialEventRun(void) @@ -359,6 +369,7 @@ void serialEventRun(void) if (Serial1.available()) serialEvent1(); if (Serial2.available()) serialEvent2(); if (Serial3.available()) serialEvent3(); + if (Serial4.available()) serialEvent4(); } // ---------------------------------------------------------------------------- @@ -415,6 +426,11 @@ void init( void ) g_APinDescription[PINS_USART3].ulPinType, g_APinDescription[PINS_USART3].ulPin, g_APinDescription[PINS_USART3].ulPinConfiguration); + PIO_Configure( + g_APinDescription[PINS_USART4].pPort, + g_APinDescription[PINS_USART4].ulPinType, + g_APinDescription[PINS_USART4].ulPin, + g_APinDescription[PINS_USART4].ulPinConfiguration); // Initialize USB pins PIO_Configure( diff --git a/variants/arduino_due_x/variant.h b/variants/arduino_due_x/variant.h index 922b40b4..39579b61 100644 --- a/variants/arduino_due_x/variant.h +++ b/variants/arduino_due_x/variant.h @@ -170,7 +170,8 @@ static const uint8_t SCL1 = PIN_WIRE1_SCL; #define PINS_USART1 (83u) // Serial3 #define PINS_USART3 (84u) - +// Serial4 +#define PINS_USART4 (92u) /* * USB Interfaces */ @@ -252,7 +253,7 @@ extern UARTClass Serial; extern USARTClass Serial1; extern USARTClass Serial2; extern USARTClass Serial3; - +extern USARTClass Serial4; #endif // These serial port names are intended to allow libraries and architecture-neutral From 928292e02f7f7f3ab3b67a8587584f498d38a39a Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 23 Dec 2021 18:15:38 +0100 Subject: [PATCH 03/14] Update UARTClass.cpp --- cores/arduino/UARTClass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/arduino/UARTClass.cpp b/cores/arduino/UARTClass.cpp index 4ac877a5..e15066fa 100644 --- a/cores/arduino/UARTClass.cpp +++ b/cores/arduino/UARTClass.cpp @@ -75,8 +75,8 @@ void UARTClass::init(const uint32_t dwBaudRate, const uint32_t modeReg) */ if((Usart*)_pUart == USART2) { - PIOB->PIO_ABSR = (0x0u); - PIOD->PIO_ABSR = PIO_ABSR_P4 | PIO_ABSR_P5; + /* Select Peripheral A for USART 2 pins */ + PIOB->PIO_ABSR &= (~(PIO_PB20A_TXD2 | PIO_PB21A_RXD2)) ; } // Enable UART interrupt in NVIC From 47c940a8a0a1b1d6c151a1ce5f9965372b2abd5f Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 23 Dec 2021 23:29:35 +0100 Subject: [PATCH 04/14] Fixed peripheral mistake --- cores/arduino/UARTClass.cpp | 12 ------------ variants/arduino_due_x/variant.cpp | 11 ++++++----- variants/arduino_due_x/variant.h | 2 +- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/cores/arduino/UARTClass.cpp b/cores/arduino/UARTClass.cpp index e15066fa..9efbe083 100644 --- a/cores/arduino/UARTClass.cpp +++ b/cores/arduino/UARTClass.cpp @@ -67,18 +67,6 @@ void UARTClass::init(const uint32_t dwBaudRate, const uint32_t modeReg) _pUart->UART_IDR = 0xFFFFFFFF; _pUart->UART_IER = UART_IER_RXRDY | UART_IER_OVRE | UART_IER_FRAME; - /* - Originally USART2 is used as ADC. - Override this configuration if user has initialized USART2 (serial4) - This means that the ADC functionality will no longer work - TODO: Restore functionality when calling End - */ - if((Usart*)_pUart == USART2) - { - /* Select Peripheral A for USART 2 pins */ - PIOB->PIO_ABSR &= (~(PIO_PB20A_TXD2 | PIO_PB21A_RXD2)) ; - } - // Enable UART interrupt in NVIC NVIC_EnableIRQ(_dwIrq); diff --git a/variants/arduino_due_x/variant.cpp b/variants/arduino_due_x/variant.cpp index 9a51026c..34ad3096 100644 --- a/variants/arduino_due_x/variant.cpp +++ b/variants/arduino_due_x/variant.cpp @@ -287,7 +287,7 @@ extern const PinDescription g_APinDescription[]= // 91 - CAN1 all pins { PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // 92 - USART2 (Serial4) all pins - { PIOB, PIO_PB20A_TXD2|PIO_PB21A_RXD2, ID_PIOB, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, + { PIOB, PIO_PB20A_TXD2|PIO_PB21A_RXD2, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // END { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER } } ; @@ -426,11 +426,12 @@ void init( void ) g_APinDescription[PINS_USART3].ulPinType, g_APinDescription[PINS_USART3].ulPin, g_APinDescription[PINS_USART3].ulPinConfiguration); + PIO_Configure( - g_APinDescription[PINS_USART4].pPort, - g_APinDescription[PINS_USART4].ulPinType, - g_APinDescription[PINS_USART4].ulPin, - g_APinDescription[PINS_USART4].ulPinConfiguration); + g_APinDescription[PINS_USART2].pPort, + g_APinDescription[PINS_USART2].ulPinType, + g_APinDescription[PINS_USART2].ulPin, + g_APinDescription[PINS_USART2].ulPinConfiguration); // Initialize USB pins PIO_Configure( diff --git a/variants/arduino_due_x/variant.h b/variants/arduino_due_x/variant.h index 39579b61..ad43b9e8 100644 --- a/variants/arduino_due_x/variant.h +++ b/variants/arduino_due_x/variant.h @@ -171,7 +171,7 @@ static const uint8_t SCL1 = PIN_WIRE1_SCL; // Serial3 #define PINS_USART3 (84u) // Serial4 -#define PINS_USART4 (92u) +#define PINS_USART2 (92u) /* * USB Interfaces */ From c0c002d9ef1845de4afb2ae11cb5ffeeb1e6d2dd Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 23 Dec 2021 23:42:39 +0100 Subject: [PATCH 05/14] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2faab39e..ce163c0e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,12 @@ -# Arduino Core for SAM3X CPU +# Enhanced Arduino Core for SAM3X CPU + +This repository is based from the [Arduio Sam SDK for cortex-m3](https://github.com/arduino/ArduinoCore-sam). The sdk was modified to include the following features which are not supported by the main repository: + +- Attachment of a callback function to the IRQ handler of USART/UART peripherals. This comes handy when you need to process data in real-time. +- Addition of USART2 as Serial4. +- Updated Compiler to version 10.3-2021.10 with a [modification](https://github.com/vChavezB/ArduinoBoards/blob/master/SAM3X/package_vchavezb_sam-enhanced.json) of the Arduino package "Arduino SAM Boards (32-bits ARM Cortex-M3)". + +The rest of this readme has been kept unmodified and is as-is from the original repo. This repository contains the source code and configuration files of the Arduino Core for Atmel's SAM3X processor (used on the [Arduino Due](https://www.arduino.cc/en/Main/ArduinoBoardDue) board). From ba5df989fbb655e3998ecbfafd7b3cbfa06d18b5 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 15:01:49 +0200 Subject: [PATCH 06/14] Update new.cpp overload for delete operator to compile code >C++14 --- cores/arduino/new.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cores/arduino/new.cpp b/cores/arduino/new.cpp index f1897758..746bc338 100644 --- a/cores/arduino/new.cpp +++ b/cores/arduino/new.cpp @@ -34,3 +34,14 @@ void operator delete[](void * ptr) { free(ptr); } +/* +Fix for C++>14 +https://forum.arduino.cc/t/undefined-reference-to-operator-delete-void-unsigned-int/620428 +*/ +void operator delete(void* ptr, std::size_t) _GLIBCXX_USE_NOEXCEPT { + delete ptr; +} + +void operator delete[](void* ptr, std::size_t) _GLIBCXX_USE_NOEXCEPT { + delete[] ptr; +} From 3cae31a44fbe289122a46ff1ae02d7a132cfd7c7 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:18:47 +0200 Subject: [PATCH 07/14] Update platform.txt updated Compiler and std version to latest (C17,C++20) --- platform.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform.txt b/platform.txt index d3b68297..cab922ef 100644 --- a/platform.txt +++ b/platform.txt @@ -17,15 +17,15 @@ compiler.warning_flags.default= compiler.warning_flags.more=-Wall compiler.warning_flags.all=-Wall -Wextra -compiler.path={runtime.tools.arm-none-eabi-gcc-10.3-2021.10.path}/bin/ +compiler.path={runtime.tools.arm-none-eabi-gcc-11.2.1-xpack.path}/bin/ compiler.c.cmd=arm-none-eabi-gcc -compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD +compiler.c.flags=-c -g -Os {compiler.warning_flags} -std=gnu17 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -Dprintf=iprintf -MMD compiler.c.elf.cmd=arm-none-eabi-gcc compiler.c.elf.flags=-Os -Wl,--gc-sections compiler.S.cmd=arm-none-eabi-gcc compiler.S.flags=-c -g -x assembler-with-cpp -MMD compiler.cpp.cmd=arm-none-eabi-g++ -compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD +compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++20 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD compiler.ar.cmd=arm-none-eabi-ar compiler.ar.flags=rcs compiler.objcopy.cmd=arm-none-eabi-objcopy From 71d1612d8a589ac67c2c9bb6033124eb38e000d9 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:20:56 +0200 Subject: [PATCH 08/14] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce163c0e..fef55f2d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ This repository is based from the [Arduio Sam SDK for cortex-m3](https://github. - Attachment of a callback function to the IRQ handler of USART/UART peripherals. This comes handy when you need to process data in real-time. - Addition of USART2 as Serial4. -- Updated Compiler to version 10.3-2021.10 with a [modification](https://github.com/vChavezB/ArduinoBoards/blob/master/SAM3X/package_vchavezb_sam-enhanced.json) of the Arduino package "Arduino SAM Boards (32-bits ARM Cortex-M3)". +- Updated GCC to version 11.2.1. Requirse to use the following custom [board package](https://github.com/vChavezB/ArduinoBoards/blob/master/SAM3X/package_vchavezb_sam-enhanced.json). +- Using by default C++20 and C17 The rest of this readme has been kept unmodified and is as-is from the original repo. From 574f1f2c1d1d6e68b20d3b8ac889da8d53d211d6 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:22:35 +0200 Subject: [PATCH 09/14] Create package.json --- package.json | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 00000000..46dbd47f --- /dev/null +++ b/package.json @@ -0,0 +1,175 @@ +{ + "packages": [ + { + "name": "SAM-Enhanced", + "maintainer": "VChavezB", + "websiteURL": "http://www.arduino.cc/", + "email": "chavez-bermudez@fh-aachen.de", + "help": { + "online": "http://www.arduino.cc/en/Reference/HomePage" + }, + "platforms": [ + { + "name": "Arduino SAM Boards (32-bits ARM Cortex-M3) Enhanced", + "architecture": "sam", + "version": "0.0.4", + "category": "Contributed", + "url": "https://github.com/vChavezB/ArduinoCore-sam/archive/refs/tags/v0.0.4.tar.gz", + "archiveFileName": "ArduinoCore-sam-0.0.4.tar.gz", + "checksum": "MD5:9f2e4e43e119cae57ec2ade7990d37f3", + "size": 38842368, + "boards": [ + {"name": "Arduino Due Enhanced"} + ], + "toolsDependencies": [ + { + "packager": "arduino", + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1" + }, + { + "packager": "SAM-Enhanced", + "name": "arm-none-eabi-gcc", + "version": "10.3-2021.10" + }, + { + "packager": "SAM-Enhanced", + "name": "arm-none-eabi-gcc", + "version": "11.2.1-xpack" + }, + { + "packager": "arduino", + "name": "bossac", + "version": "1.7.0-arduino3" + } + ] + } + ], + "tools": [ + { + "name": "arm-none-eabi-gcc", + "version": "4.8.3-2014q1", + "systems": [ + { + "host": "arm-linux-gnueabihf", + "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-arm.tar.bz2", + "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-arm.tar.bz2", + "checksum": "SHA-256:ebe96b34c4f434667cab0187b881ed585e7c7eb990fe6b69be3c81ec7e11e845", + "size": "44423906" + }, + { + "host": "i686-mingw32", + "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz", + "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz", + "checksum": "SHA-256:fd8c111c861144f932728e00abd3f7d1107e186eb9cd6083a54c7236ea78b7c2", + "size": "84537449" + }, + { + "host": "x86_64-apple-darwin", + "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz", + "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz", + "checksum": "SHA-256:3598acf21600f17a8e4a4e8e193dc422b894dc09384759b270b2ece5facb59c2", + "size": "52518522" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz", + "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz", + "checksum": "SHA-256:d23f6626148396d6ec42a5b4d928955a703e0757829195fa71a939e5b86eecf6", + "size": "51395093" + }, + { + "host": "i686-pc-linux-gnu", + "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz", + "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz", + "checksum": "SHA-256:ba1994235f69c526c564f65343f22ddbc9822b2ea8c5ee07dd79d89f6ace2498", + "size": "51029223" + } + ] + }, + { + "name": "arm-none-eabi-gcc", + "version": "10.3-2021.10", + "systems": [ + { + "host": "aarch64-linux-gnu", + "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-aarch64-linux.tar.bz2", + "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-aarch64-linux.tar.bz2", + "size": 168772350, + "checksum": "MD5:3fe3d8bb693bd0a6e4615b6569443d0d" + }, + { + "host": "i686-mingw32", + "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-win32.zip", + "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-win32.zip", + "size": 200578763, + "checksum": "MD5:2bc8f0c4c4659f8259c8176223eeafc1" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-mac.tar.bz2", + "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-mac.tar.bz2", + "size": 158961466, + "checksum": "MD5:7f2a7b7b23797302a9d6182c6e482449" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2", + "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2", + "size": 157089706, + "checksum": "MD5:2383e4eb4ea23f248d33adc70dc3227e" + } + ] + }, + { + "name": "arm-none-eabi-gcc", + "version": "11.2.1-xpack", + "systems": [ + { + "host": "aarch64-apple-darwin", + "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-arm64.tar.gz", + "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-arm64.tar.gz", + "size": 231851100, + "checksum": "MD5:0caba7c6ccbff8835dba0205bb2d4d11" + }, + { + "host": "aarch64-linux-gnu", + "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm64.tar.gz", + "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm64.tar.gz", + "size": 233645479, + "checksum": "MD5:63493c0104c565de6dca59b3b90372f0" + }, + { + "host": "arm-linux-gnueabihf", + "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm.tar.gz", + "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm.tar.gz", + "size": 227115677, + "checksum": "MD5:1d3f4055069b6326806051e15b9de059" + }, + { + "host": "i686-mingw32", + "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip", + "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip", + "size": 247612940, + "checksum": "MD5:7fddeaa4a24b2fc1b0486567af9bc301" + }, + { + "host": "x86_64-apple-darwin", + "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-x64.tar.gz", + "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-x64.tar.gz", + "size": 227115677, + "checksum": "MD5:95df8a69d322f34ec27dc3f4bb82e897" + }, + { + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz", + "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz", + "size": 235243515, + "checksum": "MD5:be8351d78458365432c5591c0fc9759d" + } + ] + } + ] + } + ] +} From 634827ec23fc0309b0fc17107ab6bafa4c339c9b Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:23:07 +0200 Subject: [PATCH 10/14] Update package.json --- package.json | 85 ---------------------------------------------------- 1 file changed, 85 deletions(-) diff --git a/package.json b/package.json index 46dbd47f..8e032258 100644 --- a/package.json +++ b/package.json @@ -22,16 +22,6 @@ {"name": "Arduino Due Enhanced"} ], "toolsDependencies": [ - { - "packager": "arduino", - "name": "arm-none-eabi-gcc", - "version": "4.8.3-2014q1" - }, - { - "packager": "SAM-Enhanced", - "name": "arm-none-eabi-gcc", - "version": "10.3-2021.10" - }, { "packager": "SAM-Enhanced", "name": "arm-none-eabi-gcc", @@ -46,81 +36,6 @@ } ], "tools": [ - { - "name": "arm-none-eabi-gcc", - "version": "4.8.3-2014q1", - "systems": [ - { - "host": "arm-linux-gnueabihf", - "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-arm.tar.bz2", - "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-arm.tar.bz2", - "checksum": "SHA-256:ebe96b34c4f434667cab0187b881ed585e7c7eb990fe6b69be3c81ec7e11e845", - "size": "44423906" - }, - { - "host": "i686-mingw32", - "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz", - "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-windows.tar.gz", - "checksum": "SHA-256:fd8c111c861144f932728e00abd3f7d1107e186eb9cd6083a54c7236ea78b7c2", - "size": "84537449" - }, - { - "host": "x86_64-apple-darwin", - "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz", - "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-mac.tar.gz", - "checksum": "SHA-256:3598acf21600f17a8e4a4e8e193dc422b894dc09384759b270b2ece5facb59c2", - "size": "52518522" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz", - "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz", - "checksum": "SHA-256:d23f6626148396d6ec42a5b4d928955a703e0757829195fa71a939e5b86eecf6", - "size": "51395093" - }, - { - "host": "i686-pc-linux-gnu", - "url": "http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz", - "archiveFileName": "gcc-arm-none-eabi-4.8.3-2014q1-linux32.tar.gz", - "checksum": "SHA-256:ba1994235f69c526c564f65343f22ddbc9822b2ea8c5ee07dd79d89f6ace2498", - "size": "51029223" - } - ] - }, - { - "name": "arm-none-eabi-gcc", - "version": "10.3-2021.10", - "systems": [ - { - "host": "aarch64-linux-gnu", - "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-aarch64-linux.tar.bz2", - "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-aarch64-linux.tar.bz2", - "size": 168772350, - "checksum": "MD5:3fe3d8bb693bd0a6e4615b6569443d0d" - }, - { - "host": "i686-mingw32", - "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-win32.zip", - "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-win32.zip", - "size": 200578763, - "checksum": "MD5:2bc8f0c4c4659f8259c8176223eeafc1" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-mac.tar.bz2", - "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-mac.tar.bz2", - "size": 158961466, - "checksum": "MD5:7f2a7b7b23797302a9d6182c6e482449" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2", - "archiveFileName": "gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2", - "size": 157089706, - "checksum": "MD5:2383e4eb4ea23f248d33adc70dc3227e" - } - ] - }, { "name": "arm-none-eabi-gcc", "version": "11.2.1-xpack", From 26a224a37eece7f5f0019f823fac03a7641e2987 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:25:27 +0200 Subject: [PATCH 11/14] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fef55f2d..86c8853f 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,16 @@ This repository is based from the [Arduio Sam SDK for cortex-m3](https://github. - Attachment of a callback function to the IRQ handler of USART/UART peripherals. This comes handy when you need to process data in real-time. - Addition of USART2 as Serial4. -- Updated GCC to version 11.2.1. Requirse to use the following custom [board package](https://github.com/vChavezB/ArduinoBoards/blob/master/SAM3X/package_vchavezb_sam-enhanced.json). +- Updated GCC to version 11.2.1. - Using by default C++20 and C17 +## Installation + +Add the following url to your Arduino package manager + +https://raw.githubusercontent.com/vChavezB/ArduinoCore-sam/master/package.json + + The rest of this readme has been kept unmodified and is as-is from the original repo. This repository contains the source code and configuration files of the Arduino Core for Atmel's SAM3X processor (used on the [Arduino Due](https://www.arduino.cc/en/Main/ArduinoBoardDue) board). From 5e0eb9201e08ba26de59ef8c956efb454c01e038 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:26:21 +0200 Subject: [PATCH 12/14] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 86c8853f..d7984b85 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,11 @@ Add the following url to your Arduino package manager https://raw.githubusercontent.com/vChavezB/ArduinoCore-sam/master/package.json - +--- The rest of this readme has been kept unmodified and is as-is from the original repo. +--- + This repository contains the source code and configuration files of the Arduino Core for Atmel's SAM3X processor (used on the [Arduino Due](https://www.arduino.cc/en/Main/ArduinoBoardDue) board). ## Installation on Arduino IDE From 3551f6c2e12fa3496464540609fe51db15ddfca2 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:29:50 +0200 Subject: [PATCH 13/14] Delete package.json --- package.json | 90 ---------------------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 package.json diff --git a/package.json b/package.json deleted file mode 100644 index 8e032258..00000000 --- a/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "packages": [ - { - "name": "SAM-Enhanced", - "maintainer": "VChavezB", - "websiteURL": "http://www.arduino.cc/", - "email": "chavez-bermudez@fh-aachen.de", - "help": { - "online": "http://www.arduino.cc/en/Reference/HomePage" - }, - "platforms": [ - { - "name": "Arduino SAM Boards (32-bits ARM Cortex-M3) Enhanced", - "architecture": "sam", - "version": "0.0.4", - "category": "Contributed", - "url": "https://github.com/vChavezB/ArduinoCore-sam/archive/refs/tags/v0.0.4.tar.gz", - "archiveFileName": "ArduinoCore-sam-0.0.4.tar.gz", - "checksum": "MD5:9f2e4e43e119cae57ec2ade7990d37f3", - "size": 38842368, - "boards": [ - {"name": "Arduino Due Enhanced"} - ], - "toolsDependencies": [ - { - "packager": "SAM-Enhanced", - "name": "arm-none-eabi-gcc", - "version": "11.2.1-xpack" - }, - { - "packager": "arduino", - "name": "bossac", - "version": "1.7.0-arduino3" - } - ] - } - ], - "tools": [ - { - "name": "arm-none-eabi-gcc", - "version": "11.2.1-xpack", - "systems": [ - { - "host": "aarch64-apple-darwin", - "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-arm64.tar.gz", - "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-arm64.tar.gz", - "size": 231851100, - "checksum": "MD5:0caba7c6ccbff8835dba0205bb2d4d11" - }, - { - "host": "aarch64-linux-gnu", - "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm64.tar.gz", - "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm64.tar.gz", - "size": 233645479, - "checksum": "MD5:63493c0104c565de6dca59b3b90372f0" - }, - { - "host": "arm-linux-gnueabihf", - "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm.tar.gz", - "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-arm.tar.gz", - "size": 227115677, - "checksum": "MD5:1d3f4055069b6326806051e15b9de059" - }, - { - "host": "i686-mingw32", - "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip", - "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-win32-x64.zip", - "size": 247612940, - "checksum": "MD5:7fddeaa4a24b2fc1b0486567af9bc301" - }, - { - "host": "x86_64-apple-darwin", - "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-x64.tar.gz", - "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-darwin-x64.tar.gz", - "size": 227115677, - "checksum": "MD5:95df8a69d322f34ec27dc3f4bb82e897" - }, - { - "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v11.2.1-1.2/xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz", - "archiveFileName": "xpack-arm-none-eabi-gcc-11.2.1-1.2-linux-x64.tar.gz", - "size": 235243515, - "checksum": "MD5:be8351d78458365432c5591c0fc9759d" - } - ] - } - ] - } - ] -} From 78a6a7a95c4882448e6c7909f9f7bb758b751cc8 Mon Sep 17 00:00:00 2001 From: vChavezB <47216966+vChavezB@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:33:04 +0200 Subject: [PATCH 14/14] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d7984b85..6429a74d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ This repository is based from the [Arduio Sam SDK for cortex-m3](https://github. Add the following url to your Arduino package manager -https://raw.githubusercontent.com/vChavezB/ArduinoCore-sam/master/package.json +``` +https://raw.githubusercontent.com/vChavezB/ArduinoBoards/master/SAM3X/package_vchavezb_sam-enhanced.json +``` --- The rest of this readme has been kept unmodified and is as-is from the original repo.