Comments (8)
So what I did find out it, that the settings of the boards.txt file of the framework repo like eg framework-arduinofruitnrf52
have their corresponding settings in the boards/the_specific_bord.json files in the platform repo. In the case of the __STACK_SIZE it belongs to the extra_flags build settings. How this mapping from boards.txt to .json was done I do not know, if it is hand made or done by a script... But for first we could try by hand withe the waveshare board.
An Outline of the migration from arduino to platformio I found here:
https://community.platformio.org/t/how-to-import-use-custom-arduino-board-for-stm32l4/15792
from n-able-arduino.
I would like to contribute, need it for the meshtastic.org nrf52 integration. It is based on PlatformIO, so I would concentrate on this first. I would appreciate hints for doing this, I'm new to all this environments..
from n-able-arduino.
Great, thanks for the interest. I have started on the platform, you will find it here https://github.com/h2zero/platform-n-able
There is an example in there that you can use. This is very rough at the moment and support needs to be added to import the macro definitions from the boards.txt file, especially the __STACK_SIZE
and __HEAP_SIZE
. I have hard coded it here but that is only to test and needs to be removed/replaced.
We also need to create a framework script for nRF52 boards, idea's to do this can be borrowed from here https://github.com/platformio/platform-nordicnrf52.
It's a rough start but it's a start.
from n-able-arduino.
Great! Thanks for digging into this 😀. That link is helpful for sure.
from n-able-arduino.
There is no automatic conversion process from arduino to platformio, because
it is not 100% compatible, how to deal with the arduino menu settings...
stm32duino/Arduino_Core_STM32#924 (comment)
I was looking for existing parsers of the boards.txt file.
from n-able-arduino.
I suspected that, great investigative work!
Looks like we need to define the base values for __STACK_SIZE
and __HEAP_SIZE
in the extra flags for the each board using the extra_flags
in the json. This shouldn't be too much of a problem as the values would be the same for each chip model. I'll look into this a bit as well.
from n-able-arduino.
I am happy when we manage to see things more clearly!
__STACK_SIZE and __HEAP_SIZE comes from your nimble implementation right? It is defined on the mynewt implementatioin as well I suppose? How is it done there, I will have a look.
I also will look how the current nrf5 platformio arduino handles the board variants which are menu entries in the boards.txt file, which could be easily detected by just looking at the according .json board files.
The adafruit arduino lib put the __STACK_SIZE definition into their linker script:
https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/bf2cff4b2faa075aa5c87975f70f11bb6492ff7f/cores/nRF5/linker/nrf52_common.ld#L53
Maybe taking this as base..
from n-able-arduino.
__STACK_SIZE and __HEAP_SIZE comes from your nimble implementation right? It is defined on the mynewt implementatioin as well I suppose?
Those are linker macros actually, used here to set the sizes to maximize available ram, they don't have anything to do with NimBLE. When we define the on the command line the linker uses those values instead of the ones in the script. So all we need is to define them where they will be added to the command.
from n-able-arduino.
Related Issues (18)
- Feather Sense (nRF52840): Flashing the bootloader HOT 2
- `min` and `max` definitions in `Arduino.h` cause compilation errors HOT 10
- Error. Board type requires board_bootloader to be specified HOT 5
- OTA DFU -> any Plans for Future? HOT 5
- nrf52810 - no fpu HOT 5
- json link broken HOT 3
- Cannot upload using Black Magic
- analogRead doesn't work because value is set to 0 HOT 3
- Need help with deep sleep NRF51822 board HOT 5
- License question HOT 1
- Fails to compile on Win11 HOT 2
- Sleep with Interrupt HOT 1
- SystemON Sleep works with platform = nordicnrf52 HOT 1
- NimBLEDevice::setPower(int dbm) not working as expected HOT 1
- resets every 5s (watchdog issue) HOT 5
- Platformio framework/platform not yet in registry. HOT 6
- Adafruit Feather nRF52840 Express compilation error HOT 10
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 n-able-arduino.