GithubHelp home page GithubHelp logo

Collaborators wanted! about n-able-arduino HOT 8 OPEN

h2zero avatar h2zero commented on June 18, 2024
Collaborators wanted!

from n-able-arduino.

Comments (8)

freylax avatar freylax commented on June 18, 2024 1

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.

freylax avatar freylax commented on June 18, 2024

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.

h2zero avatar h2zero commented on June 18, 2024

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.

h2zero avatar h2zero commented on June 18, 2024

Great! Thanks for digging into this 😀. That link is helpful for sure.

from n-able-arduino.

freylax avatar freylax commented on June 18, 2024

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.

h2zero avatar h2zero commented on June 18, 2024

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.

freylax avatar freylax commented on June 18, 2024

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.

h2zero avatar h2zero commented on June 18, 2024

__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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.