Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:10 12 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Attempt to port ARMmite mmBasic to F446RE

Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3470
Posted: 07:21pm 05 Apr 2019
Copy link to clipboard 
Print this post

I have installed the STM32CubeMX software, and the Eclipse IDE, Version: Neon.3 Release (4.6.3), and done setups for the F446. I hope this is the right toolchain.

From the ARMmite roadmap thread.

  matherp said  My current version of IOPORTS.h attached. Supports STM32H743, STM32F767, STM32F407, STM32F405, STM32L476, STM32F446, STM32L496 and probably lots of others.

Thanks again for the IOPorts.h file. That was extremely helpful. I found one anomaly which might be resolved in either of 2 ways (or maybe it's correct and I don't understand the code). COM2 RX on the F446 is pin 25. Here is the IOPorts code for that:
[code]
#ifdef STM32L446xx
#define COM2_TX_PIN (HAS_64PINS ? 29 : 47) //PB10 USART3
#define COM2_RX_PIN (HAS_64PINS ? 25 : 48) //PC5
#else
#define COM2_TX_PIN (HAS_64PINS ? 29 : 47) //PB10 USART3
#define COM2_RX_PIN (HAS_64PINS ? 30 : 48) //PB11
#endif
[/code]
It might be that "STM32L446xx" should be "STM32F446xx" (or perhaps L446 covers F446)
or after the #else there should be an #ifdef STM32F446xx with its own #else and #endif.

  matherp said  Add the symbol STM32F4ports in the project properties/setting/preprocessor definitions to enable F4/L4 pinouts.

I can't figure out exactly where this setting goes in what part of the toolchain or file layout.

Also, is there something I need to do to get the .bin output--when I built the H7 code I just got the .elf and .hex files, no .bin file.

Thanks for suggestions.
Edited by lizby 2019-04-07
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4133
Posted: 06:25am 06 Apr 2019
Copy link to clipboard 
Print this post

I suspect it's a typo for STM32L476xx (see a few lines further down the file).

You could run a hex (or elf) to bin converter.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10572
Posted: 07:27am 06 Apr 2019
Copy link to clipboard 
Print this post

  Quote  It might be that "STM32L446xx" should be "STM32F446xx"


Correct, The F446 doesn't have a pin B11 for reasons unknown. I just added that clause to help you.

The L476 doesn't have a COM3 hence the clause further down


  Quote  Also, is there something I need to do to get the .bin output--when I built the H7 code I just got the .elf and .hex files, no .bin file.


Replace properties,settings,Build Steps,Post-build steps, with

arm-none-eabi-objcopy -O ihex '${BuildArtifactFileBaseName}.elf' '${BuildArtifactFileBaseName}.hex' && arm-none-eabi-size '${BuildArtifactFileName}' && arm-none-eabi-objcopy -O binary '${BuildArtifactFileBaseName}.elf' '${BuildArtifactFileBaseName}.bin'
Edited by matherp 2019-04-07
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3470
Posted: 06:04pm 08 Apr 2019
Copy link to clipboard 
Print this post

I haven't dropped the thread--I'm just stuck and trying another approach on a different PC.

Thanks for the hints. The Post-build text allowed me to build the .bin file for the H7. It also gave me the clue for where to add the symbol STM32F4ports.

Compilation/build for the F4 failed with something deep in subdir.mk, but I can't figure out what the problem is:



There also appears to be something wrong/missing in stm32F4xx_hal.h relating to HAL_StatusTypeDef settings, and ff.h: "#error Wrong configuration file (ffconf.h)."

Is the USB OTG FS needed?

Now that I better understand the steps, I'm installing CubeMX and the IDE on a different PC, and will retry the build. So much of this is so nicely automated, I'm afraid if I just stick in what seems to be needed, it will be too scattershot an approach.

Edited by lizby 2019-04-10
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3470
Posted: 09:36pm 11 Apr 2019
Copy link to clipboard 
Print this post

Still stuck--or stuck again. For a time it was a project which did not have the little "C" mark on the project icon, and so had no "C/C++ Build" or "C/C++ Properties" in Project Properties. After failing to figure out out to make it a C project, I started over today, generating the project code from CubeMX and making a C project.

Now I have the "C" mark on a new project and set the properties as suggested and copied in the Src and Inc files. I get three failures after trying to build (or perhaps it's one failure which cascaded).
Here are screenshots:






There are differences between the two files shown above and the corresponding files in the H7 project, but I don't know enough to tell whether they are significant.

Any ideas?
Edited by lizby 2019-04-13
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025