mukululul
-
Posts
3 -
Joined
-
Last visited
Content Type
Forums
Store
Downloads
Blogs
Posts posted by mukululul
-
-
Hi,
thank you very much for your detailed answer.
You nailed it with your last line. It is a alignment problem.
I was using a static buffer allocated by the compiler of course it was nicely aligned.
I am storing the calibration data in that buffer plus a header infront. This header is 3 bytes which is, I agree not very smart ;-)
I will change the headersize then the return pointer is aligned again.
Thanks again.
Michael
-
Hello,
after finally getting the EEPROM working which now holds the calibration data for the touchpad I get a hardfault. When the data is retrieved with ginput_lld_mouse_calibration_load(). The function returns a const char* to the previously saved calibration data.
The code now casts to the struct Calibration* and stores the pointer in pc. Then pc is dereferenced using the [] operator (same as *pc);
This causes the compiler to generate code which copies the struct completely. While executing this code I get a hardfault on a STM32F103ZET.
Exchanging the compiler generated code with memcpy all works fine.
if (MouseConfig.fnloadcal && (pc = (Calibration *)MouseConfig.fnloadcal(instance)))
{
//MouseConfig.caldata = pc[0];
memcpy(&MouseConfig.caldata,pc,sizeof(MouseConfig.caldata));
MouseConfig.flags |= (FLG_CAL_OK|FLG_CAL_SAVED);
if ((MouseConfig.flags & FLG_CAL_FREE))Anybody here who can explain this?
My compiler ist arm-none-eabi-gcc.exe (GCC) 4.7.2.
Thanks for your help.
Regards
Michael
Beta
in uGFX-Studio
Posted
Hi Tectu,
I guess the Linux version is still not working on Linux Mint.
michael@zebra ~/gccarm/ugfx_studio_09_linux $ ./launch.sh
./ugfx_studio/bin/uGFXStudio: symbol lookup error: ./ugfx_studio/bin/uGFXStudio: undefined symbol: _ZN7QString13toUtf8_helperERKS_
Linux zebra 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Thx
Michael