-
Notifications
You must be signed in to change notification settings - Fork 102
STM32 Project only builds Unity #3
Comments
Hi there, and thanks for raising the issue. I will try this from scratch myself ASAP but one point I can think of is that the Eclipse workspace is nothing to do with anything described here. For instance, mine is Anyway, will get back to you soon. |
Thanks Rob, no rush. I was just trying to evaluate if this library would work in my project and found that I couldn't get the firmware build to work. I'm trying to evaluate if this is suitable for some of the lowest end STM32 MCUs, much smaller than the STM32F series. Do you happen to know the compiled flash and ram size of the application? |
Yes: approx 60 kbytes flash (plus clib of course), RAM wise it depends what you do with it but definitely less than 40 kbytes heap and we know the worst case test usage fits into a 64 kbytes of an NRF52 with 10 kbytes to spare. |
So that you don't have to build that, the output is below, so less flash than I said, and there's a change coming to remove floating point (which is only needed in a few specific places you might not care about) which would remove ~20 kbytes of C library if you don't need it for other reasons yourself. Wise to budget a little room for expansion of course.
|
...and I'm currently prototyping using this code in a future part that has 128 kbytes program space and 48 kbytes r/w data space. |
Hey @RobMeades , wow, thanks for all the information! That might fit but it could be tight, I'm hoping to fit it in something like 20-30kB flash and only 5kB of RAM, as I'm using the rest for the rest of the application. I'll have to do some testing I think and see where I'm at. Thanks again and have a great weekend! |
5 kbytes RAM is going to be tight I think, though obviously it depends mostly on your application use-case. We don't try to optimise buffer sizes (e.g. AT buffer is set to 1024 bytes in case you don't happen to have flow control but it doesn't need to be that big, UART buffer is sized for the case where chip to chip security is active but I doubt you need that, don't know whether you need cellular or Wifi or BLE but in the RAM numbers above at least two of the three are assumed to be active etc.) so there will be scope to squeeze. And of course you could always just takes bits of the code and work it into something of your own. Nice website by the way :-). |
OK, I've tried to recreate this and, in so doing, have realised that the step that is missing from the list you included above is this one, cloning Unity, the unit test framework, to sit beside EDIT: I realise you may have deliberately left the Unity test framework out in order to do your RAM/flash sizing but the Here's my complete step-by-step replication so that you can see exactly what I did: 1 Create a new empty directory
2.2. To obtain the sub-modules,
Result: I now have 3 To set up the build, follow the instructions here https://github.com/u-blox/ubxlib/blob/master/port/platform/stm32cube/mcu/stm32f4/runner/README.md:
3.3 To obtain Unity, the unit test environment,
Result: I now have
4 Open the STM32Cube IDE and tell it to create a new workspace in 6 Select "Project->Build All": Result:
...and down in the project directory,
...and in the
|
Hi, Rob,I have followed your instructions but facing 22 errors in my attempt to build the project, please see the screenshot below and "BuildLog.txt" attachment. It seems that there is problem in the "Ubxlib -> U-blox -> Port -> u_port_uart.c" |
Hi there. It looks like the build is unable to find the definitions of some of the Can you tell me which version of the ST SDK you are using? As indicated in the README.md we tested with version 1.25.0. Can you grep the ST SDK directory for the function |
If the answers to the above are "1.25.0" and "yes", then can you post the |
Hi, Rob, |
Hi, Rob, Below is the .project file, I am not sure where is the .cproject file, perhaps you can point to me where it is, thanks. |
Ah, no, don't look at the folders in the Eclipse view, they are an Eclipse "fantasy view" and bear no relationship with the real world at all. Please grep for the function Not being able to find the If I download a fresh copy of the ST SDK version 1.25.0 from ST and do that search I find the declaration of the function
When I do the build following the above procedure, the line where
You can see that in every case all include paths (the If I look in the
If you look towards the end you will see I guess this might happen if To try again, I suggest that you:
Let me know if that makes things behave any better. |
FYI, just to be sure that there are no problems, I have repeated the procedure with the very latest ubxlib and a freshly downloaded STM32F4 SDK version 1.25.0. The build output is attached. So it is possible for it to work, we just have to find out what why the STM32Cube IDE (AKA Eclipse) is doing strange things in your case. |
Hi, Rob, I can locate the .project and .cproject files now. Please see attachments "runner.zip". I have followed your advice as follows but the build project errors occur.
|
This is really weird. If I take the So somehow something has modified the
Let me know how you get on. |
Hi, Rob, My build is successful now. I realize I have made a mistake in step #5, whereby after I launch STM32CubeIDE and lanuch the workplace "C:\test_for_issue_3", I choose "Start a new project" instead of select "Open project from file system"...". My fault. |
That's excellent news, many thanks for letting me know and no trouble at all, glad to make sure you are working. |
So far as I can tell, importing the STM32 project only seems to grab the Unity project, following the procedures from the previous directory.
What I did (which I think matches the guides) was to:
This then fails since Unity isn't installed. Examining the sources, only the Unity running is included in the project as a "main" file.
The text was updated successfully, but these errors were encountered: