-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added to possibility to have extra compiler directives for a board. #713
Conversation
Merged LTE support class from dev-branch
Fixed spelling error
Resolved conflicts
* Added abstraction pins for both versions of wifi modules * Added support for replacing support class serial port. * Added support for retrieving support class serial port.
Could you also add this to the PlatformIO board generation logic at arduino-pico/tools/makeboards.py Lines 191 to 203 in 1f5139d
extra_flags if present?
And re-execute the script after that. |
this would alow only one -D but the build.extra_flags allows any compilator command line parameters, not only -D example:
|
tools/makeboards.py
Outdated
if extra != None: | ||
print('%s.build.extra_flags=-D%s' % (name, extra)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe for future expansion extra
should be a list
and you can just do for x in extra:
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I'll look into that during the week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this change should also apply to the JSON creation section below, of course. I'll hold off on this merge until the list addition is in.
Another thing, not related to this PR, @PontusO, is now that there is a network infrastructure, would it make sense to integrate the different network interfaces your boards have to make use of the LWIP/etc.?
For example, on the ESP8266 using the lwip-ethernet class we've added the WizNet boards and an ENC-xxxx wired ethernet board into the LWIP infra so they can use WiFiClient
, WiFiClientSecure
, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@earlephilhower that would require some kind of MAC level firmware for esp32.
does this core support w5500 or enc28j60 as network interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would require some kind of MAC level firmware for esp32
Well, the WiFi negotiation/etc., would definitely be from scratch, but if there is a naked Ethernet packet send/receive option already available it's pretty close to fitting in to the existing lwip-ethernet/CYW43 framework.
does this core support w5500 or enc28j60 as network interface?
It's very close to supporting it. I stole the infrastructure from the ESP8266 where are drivers for those chips, but as usual I hit the code with a hatchet so probably broke some things in a minor way. They won't run with no code changes, but they should go with only minimal ones.
Only so many hours in the day, and right now my focus is on OTA, but importing those is in the queue (esp. since I got a donated W5500 board and have an ENCJ boad hanging around already)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this change should also apply to the JSON creation section below, of course. I'll hold off on this merge until the list addition is in.
Another thing, not related to this PR, @PontusO, is now that there is a network infrastructure, would it make sense to integrate the different network interfaces your boards have to make use of the LWIP/etc.?
For example, on the ESP8266 using the lwip-ethernet class we've added the WizNet boards and an ENC-xxxx wired ethernet board into the LWIP infra so they can use
WiFiClient
,WiFiClientSecure
, etc.
@earlephilhower It makes perfect sense to integrate support for our boards into the work you have made. I did some initial investigation and it looks easy enough to get the wifi control stuff in place. Lets discuss what needs to be done.
@PontusO are we ready for a merge here? Thx! |
I think so, this allows for a list of macros to be defined. As requested. |
how would you enter something like this?
|
The |
the |
As the title suggests this PR adds functionality for adding an extra compiler -D directive for each board. This adds the possibility to have some control of the compilation phase for libraries that requires different configurations for different platforms.