Programming ARM microcontrollers under FreeBSD

So the ST tools use the bootloader they provide.

What about RTEMS or FreeRTOS. How would they fit in?

You would write software under their toolchains and deploy to board? Different workflow? The RTOS provides the bootloader?

Do STM32 boards have a POST routine?
 
I am happy to see u-boot in there. I might try RTEMS first. I like the license.

How can I backup my Nucleo flash with dfu-util.....

Designware for ethernet. Much like ARM64.
 
Call me ignorant but they make the flashing seem real hard.
Although we will not used full fledged IDE here, the package provides ST-Link GDB Server which will be used for uploading RTEMS binaries to the board memory.

Can't you just use DFU mode on the board and dfu-utils for flashing? That is the route resora showed me with STM32 flight controllers.
I guess that only works for proven images. For development you need GDB?

So you need to get a board up and booting RTOS then develope software. Right?
That or use ST tools which abstracts the booting?
 
I have two BSP I could chose from.

Zephyr

RTEMS

Why do I need Cube-programmer? A build environment.

This is what I would like to learn to build:
A helper micro-HAL for your platform
 
STM32F7 are microcontrollers. Powerful ones, yet still microcontrollers.
You seem to want to do things intended for application processors (libgpiod, fltk, u-boot).
You're going to be very disappointed, after furiously banging you head against the walls for some time.
What you probably want are the STM32MP series - application processors.
 
This was more or less a purchase to explore ArduPilot and STM32. No disappointment possible. Sixty bucks for a dev board from digikey.
Worst cast scenario I run ArduPilot on it.

I want to backup the bootloader on it before proceeding.

Gee this looks awlful faimilar: 0x08000000
Sorta like u-boot's starting address...
 
You seem to want to do things intended for application processors (libgpiod, fltk, u-boot).
I am really exploring what is different between Arm32 microcontrollers and Arm64. What works on STM32.
FLTK libraries would not fit into 2MB. So I am sure alternatives exist.
There seems to be about a dozen RTOS to choose from. I have probably 4 different alternatives.

I don't like signing up for software that is closed source. So I need to move past that. This is why I am asking so many questions.
 
Zephyr really seems nice but lot of negatives comments being associated with BORG.
I saw the DTS file for my board and got all excited thinking it used u-boot.
The HelloWorld looks like an easy tutorial.

So I have two USB jacks. One with STLink and one for user.
From what I can gander I hold down the reset button on Nucleo to enter DFU mode. Then plug into to usb and backup SRAM and flash with dfu-utils.
STlink is in ports... Is STLink-3 a help or hindrance? Do you use it?

I would have preferred to have an actual microSD socket instead of pinouts.
Same with QSPI. Pins but no flash.
Dang I though dev boards had all the bells and whistles.
 
For development you need GDB?
gdb is the debugger. Some (many?) developers like to be able to view the running code, set break points, analyze state, registers and so on.
Others just use printf() (or something equivalent), figures out what's wrong, and flashes a new version.
For flashing, ports also have cad/stm32flash if your mcu falls into that bucket. (No, I have no idea why stm32flash is under the "cad" category)
 
Thanks for that link kpedersen nearly exactly what I needed. Reading datasheets alone is useless without background.

The second chart is really helpful. Seeing the representation of how the Flash .data get copied to SRAM is excellent.

Building thier own bootloader? Still reading what is start.c

So we have STLink, DFU Utils and now another. stm32flash

I can confirm dfu-utils should work for me.
 
I have to ask this probably dumb question:

WHY: Zero-fill the .bss section when device is booting? Shouldn't it be zeros already or is it NUL?
Reason why you zero-it is to have known state?

 
Noob question: is there an IDE for code development on ‘nix platforms.

I grew up in the Borland IDE environment which I FAR prefer over Visual Studio.

I remain on Delphi 7 even though Embarcadero now offers a freebie Delphi which is FAR over complicated and incompatible with my huge library of Delphi functions, same problem with Lazarus.
 
Shouldn't the devel/openocd port message have /usr/local/etc/devd as the path for user devd rules? Is that just a nicety?

I thought polluting base stuff bad. In case of upgrades it could be cleaned at that location.
 
The ST documentation is very sparse for the STM H7 Line compared to reference manual for STM F410.

My board has 2048K SRAM and 2048K Flash. I have no idea what address they use so I am going to work off the F410 sample from above.
I have a feeling starting addresses will be the same. Need to figure out final addresses.

Very nice example of bare bones booting. Just one file. startup.c
That is amazing.

ST documentation is lacking.
 
This link is about a custom SRAM board migration but the base details are there. Specifically differences between F4 and H7.
The memory starting locations are still the same on H7. I am not sure what all the different RAM components are.

Code:
MEMORY
{
  FLASH (rx)     : ORIGIN = 0x08000000, LENGTH = 2048K
  DTCMRAM (xrw)  : ORIGIN = 0x20000000, LENGTH = 128K
  RAM_D1 (xrw)   : ORIGIN = 0x24000000, LENGTH = 512K
  RAM_D2 (xrw)   : ORIGIN = 0x30000000, LENGTH = 288K
  RAM_D3 (xrw)   : ORIGIN = 0x38000000, LENGTH = 64K
  ITCMRAM (xrw)  : ORIGIN = 0x00000000, LENGTH = 64K
 
I started out on MSDOS command line and EDLIN as an editor.

I have zero desire to return to that.

I understand FBSD has all the tools one needs in the terminal but it holds zero interest for me.

I will probably skip C entirely and work in Lazarus and Object Pascal. At my late stage of life I have zero desire to return to the primitive.
 
I have zero desire to return to that.
The best approach is to blend the GUI and the command line, using each where it shines. At least, that's how I'm happy to work.

For a C/C++ IDE, you have the choice between Eclipse CDT, VSCode, Code::Blocks and CodeLite. Try them all and keep the one you prefer.
 
In embedded systems, if you don't master your build system, you don't master your system at all.

For me, Geany with plugins + make + git + compiler/linker + loader strikes the right balance between "not too old" and "not too modern," while remaining efficient for embedded.
 
Back
Top