![]() Especially because the ST Virtual COM Port Driver has to recognize and understand it. Ok, let me put it like this: a quarter of the Reference Manual for the STM32F401 is about the USB. Well, after generating and translating the CubeMX code that configures the clock sources. I bought some new, supported devices and when they finally arrived, I could start programming them. But I would have to make my own for the devices I had. The FPU should work if you fill in the right value, the startup code is there, and the supplied device files look like they are from before ST chopped them up and packaged them into LL and HAL chunks. Fortunately, all the register names and addresses are there. And while the larger controllers can have multiple banks of RAM and Flash (with different starting addresses), only continuous chunks seem to be supported. For starters, all the FPUs are defined as: "fputype:fpu_soft". Next up, as I knew what I needed, I looked closer at the free pascal / Lazarus interface. But getting the USB to work like this is far too complex. This does work, and the debugging is flawless. I hunted down, translated and added the configuration of the clock sources from the CubeMX project. When you create a project, it basically generates a single file with the startup code in assembly. I hated that, so I installed the Open Source STM32 development platform, which allows you to program to the bare metal. To enable the USB you have to use the HAL. This generates a project with a lot of source files with in total about 20 lines of C code to initialize the clock sources. And I am talking about the LL interface, the HAL one is a maze. h files, with either a HAL (the default) or a Low Level interface. At the start you have to run the STM32CubeMX tool, which generates the startup and initialization code. I installed the (brand new) official STM32 development platform. But Arduino isn't a real development platform, it's for light hobby usage only. I installed Arduino and the STM32 support, the devices I had were available and the simple program (flash the led) worked right away. I checked the device and cpu configuration files, and they look pretty good, but they're only available for the common STM32F controllers. ![]() I think I can build a bootable image with the embedded version as installed through fpcupdeluxe.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |