-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add GIGA_M4 variant #740
Add GIGA_M4 variant #740
Conversation
Hi @AndrewCapon , I understand the issue but creating a new variant (outside the automated script) is not maintainable. To fix the problem, I'd propose something like diff --git a/boards.txt b/boards.txt
index 6a067f06..7e792b73 100644
--- a/boards.txt
+++ b/boards.txt
@@ -739,7 +739,7 @@ giga.compiler.mbed.defines={build.variant.path}/defines.txt
giga.compiler.mbed.ldflags={build.variant.path}/ldflags.txt
giga.compiler.mbed.cflags={build.variant.path}/cflags.txt
giga.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
-giga.compiler.mbed.includes={build.variant.path}/includes.txt
+giga.compiler.mbed.includes={build.variant.path}/../GIGA/includes.txt
giga.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
giga.compiler.mbed="{build.variant.path}/libs/libmbed.a"
giga.vid.0=0x2341 The correctlty picks the right include paths for M4. Can you test this patch and report if it works fine for you? |
Hi @facchinm Super, thanks for the info, for the Arduino IDE I will give this a go and get back to you... Do you by any chance know how you would go about this for using Platformio/Arduino? Thanks Andy |
Platformio should work just fine as long as you compile with |
Hi @facchinm Sorry to be a little dim but I'm not sure I understand :) |
@AndrewCapon , @facchinm , @KurtE Just gave @KurtE's pintest sketch a shot that had showed different LED pins between the M7 and M4 cores (see post https://forum.arduino.cc/t/digitalwritefast-for-giga/1180527/7) making your recommended change in the boards.txt file seems to have fixed those pins have done and exhausted test but the day is still young.
|
No worries 🙂 I don't usually use platformio but in the arduino world you can specify the target using a colon separated list ( |
PlatformIO as far as I can tell does it all a bit different, there is a json file for each board. Currently the GIGA doesn't have these boards defined and unwisely I took it upon myself to have a go at getting it shoehorned in! so for instance the board definition for the portenta_h7_m4 is:
So the important bit is So I have added a board definition for the GIGA_M4 but the issue is without a GIGA_M4 Variant defined it all falls apart :) |
I also confirmed that worked with Arduino IDE nightly build 20231020 I ran the same test that @mjs513 ran, except I updated it slightly to try other Pin Names and to display a little more...
Note: this is my test sketch for my version of digitalWriteFast, digitalToggleFast... Hopefully you can get this into real builds soon! (fix for pin names) |
Closing since #741 got merged |
There is an issue when using the Giga R1 with Arduino/Platformio Arduino where the incorrect PinNames.h is used.
This is due to it using the Portenta_h7_m4 variant and the use of
includes.txt
which has incorrect locations for the include files.This variant solves that issue.