-
Notifications
You must be signed in to change notification settings - Fork 222
Fix "NNNN.a uses VFP register arguments" when building with GCC #341
Conversation
Fix compiler error "NNNN.a uses VFP register arguments" when building 4.4 using GCC. This has been suggested by @Roceh in issue NETMF#335. I've sucessfully build STM32F4DISCOVERY and MCBSTM32F400_NONET. Tested STM32F4DISCOVERY on real hardware and it seems to work OK. Couldn't test the MCBSTM32F400_NONET because I don't have that board.
Question: despite this fixing the issue, aren't we loosing something by using PLATFORM_EMULATED_FLOATINGPOINT? Shouldn't the root cause of the compiler error be corrected elsewhere so we don't have to revert to platform emulated mode? |
The real root cause here is the need for the old legacy crypto libs. Due to the same policy issues that prevent release in source, rebuilding the binaries is a logistical nightmare. Ideally, the best long term solution is to eliminate the need for them. mBedTLS or some other such library should have all the necessary support to replace the limited bit of crypto support that is still used from those libraries. So I'd argue any effort for dealing with this should focus on solving the long term issue rather than another bandage. |
@smaillet-ms Thank you Steve for looking into this.
|
|
Hi Steve, I didn't thought that you were joking or dismissing this matter. Rest assured about that! 😄 Understood about moving towards a better library and having decent cryptographic support in NETMF. This reminds me another open issue that was waiting the release of a new mBed version. |
Huh, we have SSL and TLS already supported via the OpenSSL library. As I said in 3) the only thing left using the old legacy crypto libs in question here is the boot loader and MFDeploy for checking digital signatures on firmware updates. That's it. Thus the plan to drop the closed source implementation of those libs with a new one based on the mBed TLS libraries. The secondary advantage of mBedTLS is the opportunity to replace the Bulky OpenSSL implementation we currently have. As to the roadmap, our plan is that we intend for LLilum to be the next evolution of NETMF. Thus the bulk of our efforts are focused on that. THere will be some migration of current applications for NETMF but it's not going to be a case of throw it all away and start over. However, since Llilum isn't even at a Beta stage we need to keep NETMF going. The mbed question is worthy of an entirely new topic of discussion. mBed 3.0 is a very different animal from previous releases and moving to that isn't going to be a simple effort as we'd still need to maintain support for the current code base. |
Last time I tried I couldn't make a successful build with GCC of both MCBSTM32F400 (NETWORK) and STM32F4DISCOVERY with network and SSL enabled. Thanks for the update on the roadmap. Regarding mBed: I'm not advocating that NETMF should follow or not follow that path. Was just asking what's the guidance/felling about that matter. I guess the answer to that is tight with the above. If the effort of going the mBed path is significant then it's probably better to switch NETMF to "maintenance mode" and just fix bugs so the efforts (both yours and the community) is focused in Llilum. |
GCC with networking isn't currently working. That requires altering the runtime startup code to support running the CMSIS-RTX kernel. Unfortunately that is a compiler/CRT specific thing and the work to do that with GCC+newlib hasn't been done yet. |
That's what I thought. Any time frame to look into that? I would love to help but assembly is a bit out of my expertise... 😊 |
Is there a kind soul out there that is willing to look into that startup code to support running the CMSIS-RTX kernel so we can have networking with GCC?! Pleeeeaseeee........ 😢 |
When using PLATFORM_EMULATED_FLOATINGPOINT this flag combination ‘softfp’ allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions.
Fix compiler error "NNNN.a uses VFP register arguments" when building 4.4 using GCC. This has been suggested by @Roceh in issue NETMF#335. I've sucessfully build STM32F4DISCOVERY and MCBSTM32F400_NONET. Tested STM32F4DISCOVERY on real hardware and it seems to work OK. Couldn't test the MCBSTM32F400_NONET because I don't have that board. Fix-for-GCC-build (NETMF#341)
@smaillet-ms did you have the opportunity to look into this? The fact that we need to force GCC to compile with emulated FP because of the crypto libs throws several warnings when building RTX. |
I found out that building TinyBooter and TinyCLR separately (cleaning the BuildOutput folder before each build) allows to overcome this issue. |
That's good info, thanks. I hate to leave things as a workaround but that's going to have to do on this one. The amount of effort and time to resolve it with a rebuild of the current cryptolibs is unfortunately rather high. I'd like to shift the focus to just replacing the cryptolibs with an equivalent library based on the mBed TLS libraries. We've got a short term workaround, so let's focus on resolving longer term story. |
Fixes compiler error "NNNN.a uses VFP register arguments" when building 4.4 using GCC.
This has been suggested by @Roceh in issue #335.
I've successfully build STM32F4DISCOVERY and MCBSTM32F400_NONET.
Tested STM32F4DISCOVERY on real hardware and it seems to work OK.
Couldn't test the MCBSTM32F400_NONET because I don't have that board.