Comments (7)
Nope, we haven't tried this, since the 16kB allocated for the SAMD51 bootloader means we haven't had to try to squeeze it to save space.
from uf2-samdx1.
So does that mean it is not implemented / cannot be done at this very moment in the same way as SAMD21?
from uf2-samdx1.
No, it just means I haven't tried it :). Sounds like a bug.
from uf2-samdx1.
😎
Righto - well when you do try - this is what happens...
It complains that:
- BOOT_GCLK_ID_CORE
- BOOT_GCLK_ID_SLOW
- BOOT_USART_BUS_CLOCK_INDEX
... are not defined.
Interesting that it doesn't complain about the other ones.
from uf2-samdx1.
USE_UART
is by default set to 0 in inc/uf2.h
. The #if
's that use it seem to be OK. What are you changing that causes the errors above? I'm a little confused.
from uf2-samdx1.
I'm going from this config:
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
#define CRYSTALLESS 1
#define VENDOR_NAME "Robotics Masters"
#define PRODUCT_NAME "Robo HAT MM1 M4"
#define VOLUME_LABEL "ROBOM4BOOT"
#define INDEX_URL "https://roboticsmasters.co"
#define BOARD_ID "SAMD51G19A-RoboHATMM1-v24"
#define USB_VID 0x1209
#define USB_PID 0x4D44
#define LED_PIN PIN_PB22
#define BOOT_USART_MODULE SERCOM1
#define BOOT_USART_MASK APBAMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBAMASK_SERCOM1
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0
#define BOOT_USART_PAD3 PINMUX_UNUSED
#define BOOT_USART_PAD2 PINMUX_UNUSED
#define BOOT_USART_PAD1 PINMUX_PA17C_SERCOM1_PAD1
#define BOOT_USART_PAD0 PINMUX_PA16C_SERCOM1_PAD0
#define BOOT_GCLK_ID_CORE SERCOM1_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM1_GCLK_ID_SLOW
#endif
To this config:
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H
#define CRYSTALLESS 1
#define VENDOR_NAME "Robotics Masters"
#define PRODUCT_NAME "Robo HAT MM1 M4"
#define VOLUME_LABEL "ROBOM4BOOT"
#define INDEX_URL "https://roboticsmasters.co"
#define BOARD_ID "SAMD51G19A-RoboHATMM1-v24"
#define USB_VID 0x1209
#define USB_PID 0x4D44
#define LED_PIN PIN_PB22
#endif
Nothing too spectacular 😄 .
from uf2-samdx1.
It's easy to fix to make it compile again... it's just a question of is it providing the correct functionality. It would appear that UART was always building in anyway for all bootloaders but just not running (depending on processor and configuration).
https://github.com/microsoft/uf2-samdx1/blob/master/src/usart_sam_ba.c#L120
#ifdef SAMD51
#if USE_UART
GCLK->PCHCTRL[BOOT_GCLK_ID_CORE].reg = GCLK_PCHCTRL_GEN_GCLK0_Val | (1 << GCLK_PCHCTRL_CHEN_Pos);
GCLK->PCHCTRL[BOOT_GCLK_ID_SLOW].reg = GCLK_PCHCTRL_GEN_GCLK3_Val | (1 << GCLK_PCHCTRL_CHEN_Pos);
MCLK->BOOT_USART_MASK.reg |= BOOT_USART_BUS_CLOCK_INDEX ;
#endif
#endif
I would argue that the USE_UART
should be at the top of this file / all functions not needed by the bootloader.
from uf2-samdx1.
Related Issues (20)
- bin2uf2.js throwing deprecation warning HOT 2
- [Compile Error] ATSAMD21J17A HOT 4
- Encountered two compile errors and propose a patch HOT 1
- MSC handover documentation? HOT 1
- Which Bootloader for ATSAMD21G18A-AU? HOT 3
- This repo is missing important files
- Makefile echo and python errors HOT 1
- USB initialization fails sometimes
- FAT32 HOT 2
- SAMD SDU library HOT 2
- Support Family SAML? HOT 3
- Add .bin for Seeed Wio Lite w600
- Shouldn't check_start_application clear *DBL_TAP_PTR on BOD reset, also? HOT 10
- purpose of flash_write() function in flash_samd21.c? HOT 2
- [Question] Extending storage space with external flash HOT 5
- MSC incorrect enumeration when pc booting HOT 1
- UF2 MSC volume does not show up under Linux - MacOS works fine HOT 5
- SAMD51 using SERCOM5? HOT 1
- I2C in the bootloader HOT 2
- WMODE not entirely correct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uf2-samdx1.