[libmaple] Latest - issues

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
User avatar
Pito
Posts: 1502
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

[libmaple] Latest - issues

Post by Pito » Wed Jul 19, 2017 10:32 am

Finally I've downloaded the latest from Roger's repo and now trying to compile the simple test http://www.stm32duino.com/viewtopic.php?f=51&t=2354 , for my Black F407 using the "Discovery F407 board spec", working in Sloeber, vanilla repo..
Update: I have to use this in platform.txt for F4

Code: Select all

recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/
{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" 
"-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common 
-Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} -Wl,--end-group
as with the default I get zillion errors (multiple defs) - that is caused by

Code: Select all

--whole-archive "{build.path}/{archive_file}" -Wl,--no-whole-archive -Wl,--end-group
and was discussed in past.

The problem here is I cannot get the stuff working. It compiles. Using Discovery F407 board spec for my Black F407, with USB the device is not recognized, with serial it prints nothing.
Interestingly my "old" libmaple repo (using Discovery F407 board spec) works with USB as well with Serial with that test.
Any hint, plz?

PS: the same with "Generic F407".
Last edited by Pito on Thu Jul 27, 2017 9:48 am, edited 5 times in total.
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 1521
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] Latest - issues

Post by stevestrong » Wed Jul 19, 2017 11:27 am

Any specific example which does not work?
Please also attach the error messages.

The repo is designed for use with Arduino IDE, so your issues may be due to a Sloeber problematic...
Under PlatformIO I had no problems...

User avatar
Pito
Posts: 1502
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] Latest - issues

Post by Pito » Wed Jul 19, 2017 12:44 pm

@steve: there is the link above with the simple example.
No error messages (provided I changed the chunk in the platform.txt, also see above). It compiles fine.
The older version of my libmaple repo works with Sloeber..
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1502
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] Latest - issues

Post by Pito » Wed Jul 19, 2017 1:21 pm

So this is the organization of my Arduino_STM32 folder which works with Sloeber here (with the newest libmaple as well):
Arduino_STM32 Org.JPG
Arduino_STM32 Org.JPG (17.27 KiB) Viewed 239 times
The subfolders STM32xx are various versions of repositories (ie DE - older Daniel, DE1- newest Daniel, RG0 - older Roger, RG-newest Roger, Victor, Steve, etc) with following tricks I did:
1. in the newest RG libmaple I have to patch the platform.txt - see above, otherwise zillion errors with multiple defs
2. mind the Arduino_Arch_xyz is currently derived from the names of folders above (not good), afaik it should be _STM32 (ie SdFat is using that).

When you open the Sloeber's platform selector (Project->Properties->Arduino), you will see
Sloeber platform selection.JPG
Sloeber platform selection.JPG (126.02 KiB) Viewed 237 times
Still coping with F407 in the newest RG libmaple. Device not recognized.. Even when compiled with SerialUSB inactive, USB still tries to connect but with error Device not recognized. With none Serial via Uart.
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1502
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] Latest - issues

Post by Pito » Wed Jul 19, 2017 3:36 pm

This is the recipe which works with latest RG libmaple under Sloeber (platform.txt):

Code: Select all

recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/
{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" 
"-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common 
-Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} -Wl,--end-group
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 1521
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] Latest - issues

Post by stevestrong » Wed Jul 19, 2017 4:07 pm

Pito,

having the latest version of Roger´s repo:
- I opened Arduino IDE, file->new
- selected "Generic STM32F407V series", "USB serial (CDC)"
- pasted your example
- pressed the "Verify" button...
-> success.
No warnings, no errors.

- changing to "USB inactive"
- pressed the "Verify" button...
-> success.
No warnings, no errors.

So it doesn't seem to be a Libmaple issue, since it works fine with Arduino IDE.

AS I told, your issue is probably linked with Sloeber.
Sorry, but there I cannot help you.

Closed from my side.

P.S. please also change the title.

User avatar
Pito
Posts: 1502
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] Latest - issues

Post by Pito » Wed Jul 19, 2017 5:22 pm

AS I told, your issue is probably linked with Sloeber.
Sorry, but there I cannot help you.
Closed from my side.
@steve: I do not request you to do.. The fact the libmaple does not compile sources under Sloeber is indeed a kind of issue, as the Sloeber is an Eclipse plugin for arduino ide stuff.. There could be people who want to run Sloeber as the Sloeber is a bit more advanced as the arduino ide.. And there is not such code without bugs/issues, you know that well.. ;)
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 1521
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: [libmaple] Latest - issues

Post by stevestrong » Wed Jul 19, 2017 5:43 pm

Pito, I don't say that libmaple core is bug-free 8-)

I just want you to remove the reference of the issue to libmaple, because people seeing this may think that there is something wrong with libmaple core.
But it works under Arduino IDE, as it should.

In reality your issue is Eclipse+Sloeber plugin related.

User avatar
Pito
Posts: 1502
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: [libmaple] Latest - issues

Post by Pito » Tue Aug 15, 2017 5:51 pm

Here is an indication the latest shows some anomaly with Heap/malloc().

http://www.stm32duino.com/viewtopic.php ... =20#p32917

http://www.stm32duino.com/viewtopic.php ... 924#p32924

When running the demo the latest crashes here, while Daniel's works.

Maybe a third person may test. It is a quick test, ie with BluePill or Maple Mini.
Set n = 4000 for example.
Pukao Hats Cleaning Services Ltd.

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

Re: [libmaple] Latest - issues

Post by RogerClark » Tue Aug 15, 2017 10:03 pm

This is a duplicate post thread and will be removed

Post Reply