Arduino Menu 3.0

Working libraries, libraries being ported and related hardware
victor_pv
Posts: 1745
Joined: Mon Apr 27, 2015 12:12 pm

Re: Arduino Menu 3.0

Post by victor_pv » Thu Mar 02, 2017 6:35 pm

BennehBoy wrote:
zmemw16 wrote:what happens when just printing item? 'Serial << item<<endl;'
Crashes
zmemw16 wrote:and add a simple 'Serial<<'***************'<<endl;' line to see if it dies there
srp
Prints out the asterisks, no crash.
I would say item is null. Is it a pointer to a string? if so, can you print the pointer value at that point?
This would be good use for a debugger ;)

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

Re: Arduino Menu 3.0

Post by BennehBoy » Thu Mar 02, 2017 7:06 pm

No it's a pointer to a class instance, I think basically it's self referential, the instance of the menu class that is selected passes a pointer to itself to the function, so that the code can say 'menu item x' was selected.

It's not important really because I don't think I'll ever need to use that within my menu system.

And yes a debugger would be good - sure the hell beats moving a 'Serial.println("got here");' about in the code :D
-------------------------------------
https://github.com/BennehBoy

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

Re: Arduino Menu 3.0

Post by BennehBoy » Thu Mar 02, 2017 9:11 pm

So it looks like idiot here must've done something daft, the code when refreshed from github runs fine on a nano, but still crashes the mini.

:(
-------------------------------------
https://github.com/BennehBoy

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

Re: Arduino Menu 3.0

Post by RogerClark » Thu Mar 02, 2017 11:08 pm

Do you mean it crashes on some AVR boards ?

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

Re: Arduino Menu 3.0

Post by BennehBoy » Fri Mar 03, 2017 10:41 am

RogerClark wrote:Do you mean it crashes on some AVR boards ?
No it runs fine on AVR, I must've made some change when I was experiencing the garbage output - it did not crash however.

It _does_ crash on STM32 but only if that particular class is used - I've been in discussion with the author and his view was that that class was only used for demo purposes anyway. So, I'm going to go ahead and try to use it and see where I get.

Roger, I've had to change the build options to include gnu++11 in order to compile the code:

Code: Select all

mapleMini.build.cpu_flags=-DMCU_STM32F103CB -DSERIAL_USB -std=gnu++11
So far I've not found any problems from doing so (other than cc1.exe warning about that option not being relevant).
-------------------------------------
https://github.com/BennehBoy

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

Re: Arduino Menu 3.0

Post by RogerClark » Fri Mar 03, 2017 11:20 am

These flags have been discussed on another thread

http://www.stm32duino.com/viewtopic.php?t=1241

It sounds like they are now the standard for the ARM Arduino build settings, so we should consider using them.

However I can only do limited testing e.g. with my projects, so the proof of the pudding would be just to update the repo and wait for people to complain if it caused side effects

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

Re: Arduino Menu 3.0

Post by BennehBoy » Fri Mar 03, 2017 1:02 pm

RogerClark wrote:These flags have been discussed on another thread

http://www.stm32duino.com/viewtopic.php?t=1241

It sounds like they are now the standard for the ARM Arduino build settings, so we should consider using them.

However I can only do limited testing e.g. with my projects, so the proof of the pudding would be just to update the repo and wait for people to complain if it caused side effects
Yeah and to be honest I don't think the burden of testing should fall on one person.

Perhaps we need a number of branches...
master (stable)
testing (first place that dev gets merged into once it appears stable)
dev (expect stuff to be broken)

Those of us on the 'bleeding' edge would then act as the canaries on 'testing' branch.

PS, forgive me if this stuff is already there! Maybe you need to pick some trusted folks (ie NOT me :D ) to delegate some of the admin/legwork to?
-------------------------------------
https://github.com/BennehBoy

victor_pv
Posts: 1745
Joined: Mon Apr 27, 2015 12:12 pm

Re: Arduino Menu 3.0

Post by victor_pv » Fri Mar 03, 2017 4:57 pm

RogerClark wrote:These flags have been discussed on another thread

http://www.stm32duino.com/viewtopic.php?t=1241

It sounds like they are now the standard for the ARM Arduino build settings, so we should consider using them.

However I can only do limited testing e.g. with my projects, so the proof of the pudding would be just to update the repo and wait for people to complain if it caused side effects
Roger, I would recommend to open a post for the change and ask for people to test it.
I was in fact almost going to use the c11 flag the other day, but decided not to because if something worked for me with that may not work later with the normal repo, so I for one am happy to test it with a few things.
I'm using sdfat, an spi disaply, and the TMRpcm library I half finished to test the modifications to the SPI library, so I am using a few peripherals (spi1 and 2, DMA, Hardware Timers, Hardware Serial). If a few people joins using some more peripherals, we should be covered.

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

Re: Arduino Menu 3.0

Post by BennehBoy » Fri Mar 03, 2017 7:44 pm

My project uses H/W SPI & i2C, and a lot of libraries :D So has another base covered from the i2c perspective.
-------------------------------------
https://github.com/BennehBoy

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

Re: Arduino Menu 3.0

Post by RogerClark » Fri Mar 03, 2017 8:23 pm

Victor

Ok.

I will do that.

I will post a replacement platform.txt

Post Reply