Arduino Menu 3.0

Working libraries, libraries being ported and related hardware
User avatar
BennehBoy
Posts: 420
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Arduino Menu 3.0

Post by BennehBoy » Fri Mar 03, 2017 9:03 pm

Just be aware that on first compile cc1.exe will complain a lot.
-------------------------------------
https://github.com/BennehBoy

User avatar
RogerClark
Posts: 6397
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino Menu 3.0

Post by RogerClark » Fri Mar 03, 2017 9:05 pm

BennehBoy wrote:Just be aware that on first compile cc1.exe will complain a lot.
Do you mean the core produces lots of warnings

User avatar
BennehBoy
Posts: 420
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Arduino Menu 3.0

Post by BennehBoy » Fri Mar 03, 2017 9:12 pm

tbh I'm not entirely sure, when the IDE displays 'Build options changed, rebuilding all' and does a full compile it appears to pass the std=gnu++11 options into both the c++ and c compilers, the c one (cc1.exe I presume) then just displays a warning saying it was passed an option that is only relevant to c++. Fortunately it handles it well, just might show a lot of warnings that people are not used to.

Code: Select all

cc1.exe: warning: command line option '-std=gnu++11' is valid for C++/ObjC++ but not for C [enabled by default]
-------------------------------------
https://github.com/BennehBoy

User avatar
BennehBoy
Posts: 420
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Arduino Menu 3.0

Post by BennehBoy » Fri Mar 03, 2017 9:16 pm

Incidentally, the menu system functions well other than for the issue with the demo (functionality that I won't use).

There is an issue I've found when using multiple SSD1306 displays however, because a single framebuffer in ram is used for all the displays, and it gets cleared for each screen being drawn, this results in the menu blanking out each time 'cleardisplay' is called.

The reason this happens is the author has utilised lazy updates to minimise cpu cycles - ie if the menu has not changed, then it does not output to the buffer. I'm going to ask him if it's possible to have a 'redraw all' or non lazy update added.

The workaround for the time being is to disable drawing to the other displays whilst in the menu - the menu is non blocking, so it was nice to still have the gauges on the other displays visible and updating...
-------------------------------------
https://github.com/BennehBoy

User avatar
RogerClark
Posts: 6397
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino Menu 3.0

Post by RogerClark » Sat Mar 04, 2017 5:57 am

BennehBoy wrote:tbh I'm not entirely sure, when the IDE displays 'Build options changed, rebuilding all' and does a full compile it appears to pass the std=gnu++11 options into both the c++ and c compilers, the c one (cc1.exe I presume) then just displays a warning saying it was passed an option that is only relevant to c++. Fortunately it handles it well, just might show a lot of warnings that people are not used to.

Code: Select all

cc1.exe: warning: command line option '-std=gnu++11' is valid for C++/ObjC++ but not for C [enabled by default]
If -std=gen++11 is only valid for cpp, can't it just (only) be added to the cpp recipe, i.e the latter of these two

Code: Select all

## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"

## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags} {compiler.libs.c.flags} {includes} "{source_file}" -o "{object_file}"

User avatar
BennehBoy
Posts: 420
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Arduino Menu 3.0

Post by BennehBoy » Sat Mar 04, 2017 8:54 am

Yeah, I probably added it in the wrong place.

I added it to the build flags for maple mini in boards.txt:

Code: Select all

mapleMini.build.cpu_flags=-DMCU_STM32F103CB -DSERIAL_USB -std=gnu++11
-------------------------------------
https://github.com/BennehBoy

zmemw16
Posts: 1296
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Arduino Menu 3.0

Post by zmemw16 » Sat Mar 04, 2017 12:14 pm

no complaints if you put it in the compile.cpp.flags line and not the c.compile.flags line in platform.txt
Q also in the STM32F4 platform.txt or just add to all platform.txt files?
srp

User avatar
RogerClark
Posts: 6397
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Arduino Menu 3.0

Post by RogerClark » Sat Mar 04, 2017 8:25 pm

zmemw16 wrote:no complaints if you put it in the compile.cpp.flags line and not the c.compile.flags line in platform.txt
Q also in the STM32F4 platform.txt or just add to all platform.txt files?
srp
Yes. I would do it for both F1 and F4

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest