From bb8e18202400d24723838652c3318d726ce97879 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Wed, 28 Aug 2024 21:58:51 +0200 Subject: [PATCH] pio build --- src/knx/knx_facade.cpp | 30 +- src/knx/knx_facade.h | 739 ++++++++++--------- src/knx/platform/rp2040_arduino_platform.cpp | 14 +- src/knx/platform/samd_platform.cpp | 8 +- 4 files changed, 396 insertions(+), 395 deletions(-) diff --git a/src/knx/knx_facade.cpp b/src/knx/knx_facade.cpp index f69a8e7..b1cb9af 100644 --- a/src/knx/knx_facade.cpp +++ b/src/knx/knx_facade.cpp @@ -47,26 +47,26 @@ ICACHE_RAM_ATTR void buttonEvent() #ifdef ARDUINO_ARCH_SAMD // predefined global instance for TP or RF or TP/RF coupler #if MASK_VERSION == 0x07B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x27B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x2920 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #else #error "Mask version not supported on ARDUINO_ARCH_SAMD" #endif #elif defined(ARDUINO_ARCH_RP2040) // predefined global instance for TP or RF or IP or TP/RF coupler or TP/IP coupler #if MASK_VERSION == 0x07B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x27B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x57B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x2920 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x091A - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #else #error "Mask version not supported on ARDUINO_ARCH_RP2040" #endif @@ -74,11 +74,11 @@ ICACHE_RAM_ATTR void buttonEvent() #elif defined(ARDUINO_ARCH_ESP8266) // predefined global instance for TP or IP or TP/IP coupler #if MASK_VERSION == 0x07B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x57B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x091A - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #else #error "Mask version not supported on ARDUINO_ARCH_ESP8266" #endif @@ -86,18 +86,18 @@ ICACHE_RAM_ATTR void buttonEvent() #elif defined(ARDUINO_ARCH_ESP32) // predefined global instance for TP or IP or TP/IP coupler #if MASK_VERSION == 0x07B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x57B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #elif MASK_VERSION == 0x091A - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #else #error "Mask version not supported on ARDUINO_ARCH_ESP32" #endif #elif defined(ARDUINO_ARCH_STM32) #if MASK_VERSION == 0x07B0 - KnxFacade knx(buttonEvent); + Knx::KnxFacade knx(buttonEvent); #else #error "Mask version not supported on ARDUINO_ARCH_STM32" #endif diff --git a/src/knx/knx_facade.h b/src/knx/knx_facade.h index 74b5097..607af3a 100644 --- a/src/knx/knx_facade.h +++ b/src/knx/knx_facade.h @@ -46,468 +46,469 @@ #define KNX_BUTTON -1 #endif -namespace Knx { +namespace Knx +{ #ifndef KNX_NO_AUTOMATIC_GLOBAL_INSTANCE extern void buttonUp(); #endif -typedef const uint8_t* (*RestoreCallback)(const uint8_t* buffer); -typedef uint8_t* (*SaveCallback)(uint8_t* buffer); -typedef void (*IsrFunctionPtr)(); -typedef void (*ProgLedCallback)(bool on); + typedef const uint8_t* (*RestoreCallback)(const uint8_t* buffer); + typedef uint8_t* (*SaveCallback)(uint8_t* buffer); + typedef void (*IsrFunctionPtr)(); + typedef void (*ProgLedCallback)(bool on); #ifdef KNX_ACTIVITYCALLBACK typedef void (*ActivityCallback)(uint8_t info); #endif -template class KnxFacade : private SaveRestore -{ - public: - KnxFacade() : _platformPtr(new P()), _bauPtr(new B(*_platformPtr)), _bau(*_bauPtr) - { - manufacturerId(0xfa); - bauNumber(platform().uniqueSerialNumber()); - _bau.addSaveRestore(this); - } - - KnxFacade(B& bau) : _bau(bau) - { - _platformPtr = static_cast(&bau.platform()); - manufacturerId(0xfa); - bauNumber(platform().uniqueSerialNumber()); - _bau.addSaveRestore(this); - } - - KnxFacade(IsrFunctionPtr buttonISRFunction) : _platformPtr(new P()), _bauPtr(new B(*_platformPtr)), _bau(*_bauPtr) - { - manufacturerId(0xfa); - bauNumber(platform().uniqueSerialNumber()); - _bau.addSaveRestore(this); - setButtonISRFunction(buttonISRFunction); - } - - virtual ~KnxFacade() - { - if (_bauPtr) - delete _bauPtr; - - if (_platformPtr) - delete _platformPtr; - } - - P& platform() - { - return *_platformPtr; - } - - B& bau() - { - return _bau; - } - - bool enabled() - { - return _bau.enabled(); - } - - void enabled(bool value) - { - _bau.enabled(value); - } - - bool progMode() - { - return _bau.deviceObject().progMode(); - } - - void progMode(bool value) - { - _bau.deviceObject().progMode(value); - } - - /** - * To be called by ISR handling on button press. - */ - void toggleProgMode() - { - _toggleProgMode = true; - } - - bool configured() - { - return _bau.configured(); - } - - /** - * returns HIGH if led is active on HIGH, LOW otherwise - */ - uint32_t ledPinActiveOn() - { - return _ledPinActiveOn; - } - - /** - * Sets if the programming led is active on HIGH or LOW. - * - * Set to HIGH for GPIO--RESISTOR--LED--GND or to LOW for GPIO--LED--RESISTOR--VDD - */ - void ledPinActiveOn(uint32_t value) - { - _ledPinActiveOn = value; - } - - uint32_t ledPin() - { - return _ledPin; - } - - void ledPin(uint32_t value) - { - _ledPin = value; - } - - void progLedCallback(ProgLedCallback value) - { - _progLedCallback = value; - } - - int32_t buttonPin() - { - return _buttonPin; - } - - void buttonPin(int32_t value) - { - _buttonPin = value; - } - - void readMemory() - { - _bau.readMemory(); - } - - void writeMemory() - { - _bau.writeMemory(); - } - - uint16_t individualAddress() - { - return _bau.deviceObject().individualAddress(); - } - - void loop() - { - if (progMode() != _progLedState) + template class KnxFacade : private SaveRestore + { + public: + KnxFacade() : _platformPtr(new P()), _bauPtr(new B(*_platformPtr)), _bau(*_bauPtr) { - _progLedState = progMode(); - - if (_progLedState) - { - Logger::logger("KnxFacade").info("progmode on"); - progLedOn(); - } - else - { - Logger::logger("KnxFacade").info("progmode off"); - progLedOff(); - } + manufacturerId(0xfa); + bauNumber(platform().uniqueSerialNumber()); + _bau.addSaveRestore(this); } - if (_toggleProgMode) + KnxFacade(B& bau) : _bau(bau) { - progMode(!progMode()); - _toggleProgMode = false; + _platformPtr = static_cast(&bau.platform()); + manufacturerId(0xfa); + bauNumber(platform().uniqueSerialNumber()); + _bau.addSaveRestore(this); } - _bau.loop(); - } - - void manufacturerId(uint16_t value) - { - _bau.deviceObject().manufacturerId(value); - } - - void bauNumber(uint32_t value) - { - _bau.deviceObject().bauNumber(value); - } - - void orderNumber(const uint8_t* value) - { - _bau.deviceObject().orderNumber(value); - } - - void hardwareType(const uint8_t* value) - { - _bau.deviceObject().hardwareType(value); - } - - void version(uint16_t value) - { - _bau.deviceObject().version(value); - } - - void start() - { - if (_progLedCallback == 0 && _ledPin >= 0) - pinMode(ledPin(), OUTPUT); - - progLedOff(); - - if (_progButtonISRFuncPtr && _buttonPin >= 0) + KnxFacade(IsrFunctionPtr buttonISRFunction) : _platformPtr(new P()), _bauPtr(new B(*_platformPtr)), _bau(*_bauPtr) { - pinMode(buttonPin(), INPUT_PULLUP); - // Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587 + manufacturerId(0xfa); + bauNumber(platform().uniqueSerialNumber()); + _bau.addSaveRestore(this); + setButtonISRFunction(buttonISRFunction); + } + + virtual ~KnxFacade() + { + if (_bauPtr) + delete _bauPtr; + + if (_platformPtr) + delete _platformPtr; + } + + P& platform() + { + return *_platformPtr; + } + + B& bau() + { + return _bau; + } + + bool enabled() + { + return _bau.enabled(); + } + + void enabled(bool value) + { + _bau.enabled(value); + } + + bool progMode() + { + return _bau.deviceObject().progMode(); + } + + void progMode(bool value) + { + _bau.deviceObject().progMode(value); + } + + /** + * To be called by ISR handling on button press. + */ + void toggleProgMode() + { + _toggleProgMode = true; + } + + bool configured() + { + return _bau.configured(); + } + + /** + * returns HIGH if led is active on HIGH, LOW otherwise + */ + uint32_t ledPinActiveOn() + { + return _ledPinActiveOn; + } + + /** + * Sets if the programming led is active on HIGH or LOW. + * + * Set to HIGH for GPIO--RESISTOR--LED--GND or to LOW for GPIO--LED--RESISTOR--VDD + */ + void ledPinActiveOn(uint32_t value) + { + _ledPinActiveOn = value; + } + + uint32_t ledPin() + { + return _ledPin; + } + + void ledPin(uint32_t value) + { + _ledPin = value; + } + + void progLedCallback(ProgLedCallback value) + { + _progLedCallback = value; + } + + int32_t buttonPin() + { + return _buttonPin; + } + + void buttonPin(int32_t value) + { + _buttonPin = value; + } + + void readMemory() + { + _bau.readMemory(); + } + + void writeMemory() + { + _bau.writeMemory(); + } + + uint16_t individualAddress() + { + return _bau.deviceObject().individualAddress(); + } + + void loop() + { + if (progMode() != _progLedState) + { + _progLedState = progMode(); + + if (_progLedState) + { + Logger::logger("KnxFacade").info("progmode on"); + progLedOn(); + } + else + { + Logger::logger("KnxFacade").info("progmode off"); + progLedOff(); + } + } + + if (_toggleProgMode) + { + progMode(!progMode()); + _toggleProgMode = false; + } + + _bau.loop(); + } + + void manufacturerId(uint16_t value) + { + _bau.deviceObject().manufacturerId(value); + } + + void bauNumber(uint32_t value) + { + _bau.deviceObject().bauNumber(value); + } + + void orderNumber(const uint8_t* value) + { + _bau.deviceObject().orderNumber(value); + } + + void hardwareType(const uint8_t* value) + { + _bau.deviceObject().hardwareType(value); + } + + void version(uint16_t value) + { + _bau.deviceObject().version(value); + } + + void start() + { + if (_progLedCallback == 0 && _ledPin >= 0) + pinMode(ledPin(), OUTPUT); + + progLedOff(); + + if (_progButtonISRFuncPtr && _buttonPin >= 0) + { + pinMode(buttonPin(), INPUT_PULLUP); + // Workaround for https://github.com/arduino/ArduinoCore-samd/issues/587 #if (ARDUINO_API_VERSION >= 10200) - attachInterrupt(_buttonPin, _progButtonISRFuncPtr, (PinStatus)CHANGE); + attachInterrupt(_buttonPin, _progButtonISRFuncPtr, (PinStatus)CHANGE); #else - attachInterrupt(_buttonPin, _progButtonISRFuncPtr, CHANGE); + attachInterrupt(_buttonPin, _progButtonISRFuncPtr, CHANGE); #endif + } + + enabled(true); } - enabled(true); - } + void setButtonISRFunction(IsrFunctionPtr progButtonISRFuncPtr) + { + _progButtonISRFuncPtr = progButtonISRFuncPtr; + } - void setButtonISRFunction(IsrFunctionPtr progButtonISRFuncPtr) - { - _progButtonISRFuncPtr = progButtonISRFuncPtr; - } + void setSaveCallback(SaveCallback func) + { + _saveCallback = func; + } - void setSaveCallback(SaveCallback func) - { - _saveCallback = func; - } + void setRestoreCallback(RestoreCallback func) + { + _restoreCallback = func; + } - void setRestoreCallback(RestoreCallback func) - { - _restoreCallback = func; - } + uint8_t* paramData(uint32_t addr) + { + if (!_bau.configured()) + return nullptr; - uint8_t* paramData(uint32_t addr) - { - if (!_bau.configured()) - return nullptr; + return _bau.parameters().data(addr); + } - return _bau.parameters().data(addr); - } + // paramBit(address, shift) + // get state of a parameter as a boolean like "enable/disable", ... + // Declaration in XML file: + // ... + // + // + // + // + // + // + // ... + // + // + // + // + // + // + // + // + // + // ... + // Usage in code : + // if ( knx.paramBit(1,1)) + // { + // //do somthings .... + // } + bool paramBit(uint32_t addr, uint8_t shift) + { + if (!_bau.configured()) + return 0; - // paramBit(address, shift) - // get state of a parameter as a boolean like "enable/disable", ... - // Declaration in XML file: - // ... - // - // - // - // - // - // - // ... - // - // - // - // - // - // - // - // - // - // ... - // Usage in code : - // if ( knx.paramBit(1,1)) - // { - // //do somthings .... - // } - bool paramBit(uint32_t addr, uint8_t shift) - { - if (!_bau.configured()) - return 0; + return (bool) ((_bau.parameters().getByte(addr) >> (7 - shift)) & 0x01); + } - return (bool) ((_bau.parameters().getByte(addr) >> (7 - shift)) & 0x01); - } + uint8_t paramByte(uint32_t addr) + { + if (!_bau.configured()) + return 0; - uint8_t paramByte(uint32_t addr) - { - if (!_bau.configured()) - return 0; + return _bau.parameters().getByte(addr); + } - return _bau.parameters().getByte(addr); - } + // Same usage than paramByte(addresse) for signed parameters + // Declaration in XML file + // + // + // + int8_t paramSignedByte(uint32_t addr) + { + if (!_bau.configured()) + return 0; - // Same usage than paramByte(addresse) for signed parameters - // Declaration in XML file - // - // - // - int8_t paramSignedByte(uint32_t addr) - { - if (!_bau.configured()) - return 0; + return (int8_t) _bau.parameters().getByte(addr); + } - return (int8_t) _bau.parameters().getByte(addr); - } + uint16_t paramWord(uint32_t addr) + { + if (!_bau.configured()) + return 0; - uint16_t paramWord(uint32_t addr) - { - if (!_bau.configured()) - return 0; + return _bau.parameters().getWord(addr); + } - return _bau.parameters().getWord(addr); - } + uint32_t paramInt(uint32_t addr) + { + if (!_bau.configured()) + return 0; - uint32_t paramInt(uint32_t addr) - { - if (!_bau.configured()) - return 0; + return _bau.parameters().getInt(addr); + } - return _bau.parameters().getInt(addr); - } + double paramFloat(uint32_t addr, ParameterFloatEncodings enc) + { + if (!_bau.configured()) + return 0; - double paramFloat(uint32_t addr, ParameterFloatEncodings enc) - { - if (!_bau.configured()) - return 0; - - return _bau.parameters().getFloat(addr, enc); - } + return _bau.parameters().getFloat(addr, enc); + } #if (MASK_VERSION == 0x07B0) || (MASK_VERSION == 0x27B0) || (MASK_VERSION == 0x57B0) - GroupObject& getGroupObject(uint16_t goNr) - { - return _bau.groupObjectTable().get(goNr); - } + GroupObject& getGroupObject(uint16_t goNr) + { + return _bau.groupObjectTable().get(goNr); + } #endif - void restart(uint16_t individualAddress) - { - SecurityControl sc = {false, None}; - _bau.restartRequest(individualAddress, sc); - } + void restart(uint16_t individualAddress) + { + SecurityControl sc = {false, None}; + _bau.restartRequest(individualAddress, sc); + } - void beforeRestartCallback(BeforeRestartCallback func) - { - _bau.beforeRestartCallback(func); - } + void beforeRestartCallback(BeforeRestartCallback func) + { + _bau.beforeRestartCallback(func); + } - BeforeRestartCallback beforeRestartCallback() - { - return _bau.beforeRestartCallback(); - } + BeforeRestartCallback beforeRestartCallback() + { + return _bau.beforeRestartCallback(); + } - private: - P* _platformPtr = 0; - B* _bauPtr = 0; - B& _bau; - ProgLedCallback _progLedCallback = 0; + private: + P* _platformPtr = 0; + B* _bauPtr = 0; + B& _bau; + ProgLedCallback _progLedCallback = 0; #ifdef KNX_ACTIVITYCALLBACK - ActivityCallback _activityCallback = 0; + ActivityCallback _activityCallback = 0; #endif - uint32_t _ledPinActiveOn = KNX_LED_ACTIVE_ON; - int32_t _ledPin = KNX_LED; - int32_t _buttonPin = KNX_BUTTON; - SaveCallback _saveCallback = 0; - RestoreCallback _restoreCallback = 0; - volatile bool _toggleProgMode = false; - bool _progLedState = false; - uint16_t _saveSize = USERDATA_SAVE_SIZE; - IsrFunctionPtr _progButtonISRFuncPtr = 0; + uint32_t _ledPinActiveOn = KNX_LED_ACTIVE_ON; + int32_t _ledPin = KNX_LED; + int32_t _buttonPin = KNX_BUTTON; + SaveCallback _saveCallback = 0; + RestoreCallback _restoreCallback = 0; + volatile bool _toggleProgMode = false; + bool _progLedState = false; + uint16_t _saveSize = USERDATA_SAVE_SIZE; + IsrFunctionPtr _progButtonISRFuncPtr = 0; - uint8_t* save(uint8_t* buffer) - { - if (_saveCallback != 0) - return _saveCallback(buffer); + uint8_t* save(uint8_t* buffer) + { + if (_saveCallback != 0) + return _saveCallback(buffer); - return buffer; - } + return buffer; + } - const uint8_t* restore(const uint8_t* buffer) - { - if (_restoreCallback != 0) - return _restoreCallback(buffer); + const uint8_t* restore(const uint8_t* buffer) + { + if (_restoreCallback != 0) + return _restoreCallback(buffer); - return buffer; - } + return buffer; + } - uint16_t saveSize() - { - return _saveSize; - } + uint16_t saveSize() + { + return _saveSize; + } - void saveSize(uint16_t size) - { - _saveSize = size; - } + void saveSize(uint16_t size) + { + _saveSize = size; + } - void progLedOn() - { - if (_progLedCallback == 0) - digitalWrite(ledPin(), _ledPinActiveOn); - else - _progLedCallback(true); - } + void progLedOn() + { + if (_progLedCallback == 0) + digitalWrite(ledPin(), _ledPinActiveOn); + else + _progLedCallback(true); + } - void progLedOff() - { - if (_progLedCallback == 0) - digitalWrite(ledPin(), HIGH - _ledPinActiveOn); - else - _progLedCallback(false); - } -}; + void progLedOff() + { + if (_progLedCallback == 0) + digitalWrite(ledPin(), HIGH - _ledPinActiveOn); + else + _progLedCallback(false); + } + }; } #ifndef KNX_NO_AUTOMATIC_GLOBAL_INSTANCE #ifdef ARDUINO_ARCH_SAMD // predefined global instance for TP or RF or TP/RF coupler #if MASK_VERSION == 0x07B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x27B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x2920 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #else #error "Mask version not supported on ARDUINO_ARCH_SAMD" #endif #elif defined(ARDUINO_ARCH_RP2040) // predefined global instance for TP or RF or TP/RF or TP/IP coupler #if MASK_VERSION == 0x07B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x27B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x57B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x2920 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x091A - extern KnxFacade knx; + extern Knx::KnxFacade knx; #else #error "Mask version not supported on ARDUINO_ARCH_RP2040" #endif #elif defined(ARDUINO_ARCH_ESP8266) // predefined global instance for TP or IP or TP/IP coupler #if MASK_VERSION == 0x07B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x57B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x091A - extern KnxFacade knx; + extern Knx::KnxFacade knx; #else #error "Mask version not supported on ARDUINO_ARCH_ESP8266" #endif #elif defined(ARDUINO_ARCH_ESP32) // predefined global instance for TP or IP or TP/IP coupler #if MASK_VERSION == 0x07B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x57B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #elif MASK_VERSION == 0x091A - extern KnxFacade knx; + extern Knx::KnxFacade knx; #else #error "Mask version not supported on ARDUINO_ARCH_ESP32" #endif #elif defined(ARDUINO_ARCH_STM32) // predefined global instance for TP only #if MASK_VERSION == 0x07B0 - extern KnxFacade knx; + extern Knx::KnxFacade knx; #else #error "Mask version not supported on ARDUINO_ARCH_STM32" #endif diff --git a/src/knx/platform/rp2040_arduino_platform.cpp b/src/knx/platform/rp2040_arduino_platform.cpp index ef2f7ec..37c5f51 100644 --- a/src/knx/platform/rp2040_arduino_platform.cpp +++ b/src/knx/platform/rp2040_arduino_platform.cpp @@ -35,6 +35,13 @@ For usage of KNX-IP you have to define either #include // from Pico SDK #include // from Pico SDK +#ifdef KNX_IP_LAN + extern Wiznet5500lwIP KNX_NETIF; +#elif defined(KNX_IP_WIFI) +#elif defined(KNX_IP_GENERIC) + +#endif + namespace Knx { #ifdef USE_KNX_DMA_UART @@ -104,13 +111,6 @@ namespace Knx #if KNX_FLASH_OFFSET % 4096 #error "KNX_FLASH_OFFSET must be multiple of 4096" #endif -#endif - -#ifdef KNX_IP_LAN - extern Wiznet5500lwIP KNX_NETIF; -#elif defined(KNX_IP_WIFI) -#elif defined(KNX_IP_GENERIC) - #endif RP2040ArduinoPlatform::RP2040ArduinoPlatform() diff --git a/src/knx/platform/samd_platform.cpp b/src/knx/platform/samd_platform.cpp index 4c2f755..28819c8 100644 --- a/src/knx/platform/samd_platform.cpp +++ b/src/knx/platform/samd_platform.cpp @@ -16,6 +16,10 @@ #define KNX_SERIAL Serial1 #endif +extern uint32_t __etext; +extern uint32_t __data_start__; +extern uint32_t __data_end__; + namespace Knx { SamdPlatform::SamdPlatform() @@ -78,10 +82,6 @@ namespace Knx } #else - extern uint32_t __etext; - extern uint32_t __data_start__; - extern uint32_t __data_end__; - static const uint32_t pageSizes[] = {8, 16, 32, 64, 128, 256, 512, 1024}; void SamdPlatform::init()