-
-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST-Link v2 with SWIM as UART configured is too big to fit #1579
Comments
When you clone the repository, you should be passing If you build in the root of the project like you are supposed to, the first thing the Makefiles should do is initialise libopencm3: Lines 15 to 20 in ee3bd73
Regarding it not fitting, |
What exactly is the solution to this? I'm doing the following steps:
Which results in this:
Okay, I can get it to compile by deleting a few targets, but am I using an incorrect version of the toolchain which is generating lager binaries?
|
You're using a completely unsupported version of the toolchain that may well not even be giving you correct codegen. Please use a toolchain from ARM themselves (do note the one we've linked is untested as it's just been released, the most recent tested release toochain is 12.2.Rel1). One of the PRs that's currently outstanding saves 800 bytes of Flash which should help with this problem too. The project has simply got large and that's causing us to bat up against the limits of the Flash of these parts. Part of the v2.0 goal is a new build system which will make selecting target support and creating cut-down builds much easier. |
@dragonmux Okay, so I've downloaded some of the toolchains and this was my result: With the newest toolchain:
And with the tested one you mentioned:
I must be doing something wrong... did I download another incorrect tool chain? I was running |
You aren't doing anything wrong per se - this is just that the project is approaching the limits of what we can fit in Flash with a full project build. Interesting that the new 12.3.1 compiler results in worse code generation and less optimised binaries. We would note that you may wish to update your working copy with |
Nice, now I'm not even two percent short of fitting the firmware :D
And with the new version:
So I guess removing targets in code is still necessary for now :). And yes, it is curious that the newer version produces binaries that are quite a lot larger. |
Correct - we'll be trying to improve this before the v1.10 release if we can but we really need the new build system we're going to be introducing in v2.0 to allow users to configure what targets they're building in to really solve this given the project's only going to continue growing. |
I can understand. C++'s tooling are still stuck in the 1970s and still doesn't have a package manager. I took one look at CMake and I had to barf. A tool to make another tool easier to configure, which itself is equally if not more complicated to figure out. I'm sure there will be another tool to generate CMake and it will be equally I not more complicated to use. UNIX technologies have this recursive pattern where layers of fecal matter are built on top of fecal matter until it is so petrified it can no longer be worked with. Instead coming to their senses, its developers continue pile on even more fecal matter hoping it will turn into diamonds at some point in the future. |
The replacement build system is slated to be a Linux Kernel style Makefile build system and configuration engine like KConfig. However, we will also be trialling a Meson build system. Meson is a modern build system language designed for readability, ease of use and simplicity and uses the Ninja job engine to execute the build steps it generates as part of configuring a build. |
While v1.10.2 was indeed too big, I've managed to build v1.9.3 using the provided nix-shell (on nixos stable):
I've flashed it with the windows build of the stlink-tool using 'stlink-tool.exe blackmagic.bin'. Here you go: stlink_v2-BlackMagicV1_9_3-PROBE_HOST=stlink-ST_BOOTLOADER=1-SWIM_AS_UART=1.zip Good luck. |
I've encountered a series of issues installing BMP. First, I would prefer to download the latest version of BMP as a binary and flash it to my St-Link v2, but I wasn't sure whether it was configured for SWIM_AS_UART. I presume it must be set at compile time rather than runtime since it's passed as a make argument. There was nothing mentioned about how the firmware was configured. I
After cloning the repository, I received the following error:
libopencm3/usb/bos.h: No such file or directory
I figured the library wasn't installed on my system, so I installed it using brew and the issue persisted. I search online and finally found a BMP issue on GitHub where the user was asked if they had initialized and updated the submodules. Again, nothing mentioned this important step. Ideally, it would be nice if the makefile either checked for the initialization of the submodules and reported an error if they didn't exist or better yet, initialize and update them before starting the build process.
I performed the two git submodule operations and was able to build the project up until the link stage where it complained the firmware was too big for the ROM. I search for a solution and there were two other users who are having the same issue, but there was no resolution given. Interestingly, the resulting elf file size they posted is the same as mine. I am also running version 12.2.1 of GCC.
The firmware doesn't fit but so you must acquit.
The text was updated successfully, but these errors were encountered: