NFE_Silverware icon indicating copy to clipboard operation
NFE_Silverware copied to clipboard

Enable ARM GCC-8 to build the project

Open howard0su opened this issue 6 years ago • 8 comments

  1. Merge the makefile script with the one for Keil. USE_GCC controls which compiler to be used. by default, KEIL C is used. make USE_GCC=1 will choose gcc as the compiler suite. or export USE_GCC=1 works as well.
  2. Integrate qfplib math library for gcc to replace built-in match lib, which is too large to fit in 16kb.
  3. Disable Gesture for now in order to fit into 16KB. there are still some optimization need be done so that gesture support can be reenable again.

howard0su avatar Mar 16 '19 14:03 howard0su

based on #12 as fabs function call have to be replaced with fabsf to fit into 16KB.

howard0su avatar Mar 16 '19 14:03 howard0su

I don't have a workable drone for me to test. If anyone can test and let me know if this works, I will be happy to know.

GCC-8 for ARM can be downloaded: https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2

howard0su avatar Mar 16 '19 14:03 howard0su

I am curious why we have to fit inside the 16kb limit. Don't we have space up to 32kb? I know the spec says 16 but I thought we have always been able to flash up to 32. It would certainly solve a lot of problems if this is the case.

NotFastEnuf avatar Mar 18 '19 02:03 NotFastEnuf

I didn't try that but the spec for stm32 says only 16KB

On Mon, Mar 18, 2019 at 10:58 AM NotFastEnuf [email protected] wrote:

I am curious why we have to fit inside the 16kb limit. Don't we have space up to 32kb?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NotFastEnuf/NFE_Silverware/pull/13#issuecomment-473752004, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuzRE-GdPXuKadOnWq2CtXIZggQcJhxks5vXwC6gaJpZM4b309C .

-- -Howard

howard0su avatar Mar 18 '19 06:03 howard0su

The chips we use are 32kb. Specified at 16kb but Silverxxx found that on the whole they're all at the higher whole capacity. I can't find the exact post

vidzo avatar Mar 18 '19 09:03 vidzo

That's what I thought too. I'm successfully flashing past the 16kb spec anyway. I know this just created additional work for you squeezing it down just to add stuff back but should be worth it for the end result.

NotFastEnuf avatar Mar 18 '19 12:03 NotFastEnuf

We can give user such an option to compile as 32KB. But it is at own risk type of thing. chip manufacturer doesn't grantee it will always work beyond the spec. This is exactly like over-clocking CPU. As far as for my own usage, I have devoTx. so I can map more options to channels. so lack fo gesture is not a really big problem for myself. But I can enable it for sure.

For qfplib, I'd like to keep it as it is more compact and fast from its own website. As it is widely used, I believe it is reliable. GCC version of silverware is not wide adopted anyway.

howard0su avatar Mar 18 '19 14:03 howard0su

Apart from the fitting into 16kb discussion, fixing the fabs call to fabsf makes sense if we are only working with floats no?

ghostface avatar Apr 12 '19 13:04 ghostface