[En-Nut-Discussion] stm32_can.c fails to build

Harald Kipp harald.kipp at egnite.de
Sun Aug 19 19:33:50 CEST 2012


Hi Uwe,

On 19.08.2012 15:30, Uwe Bonnes wrote:
 
> Okay, I compiled with -O0 for easier debugging, so the alias warning didn't
> appear. GCC knows about the  __attribute__((__may_alias__)). Would appended
> patch be a sensible solution? It compiles to a single 32-bit access as
> opposed to the other proposed solutions. Is a solution like appended
> acceptable?

I do not have any objections. But unless you supply a solution for other compilers, you need to add the requirement TOOL_GCC to nutarch_cm3_stm32f_can1 and nutarch_cm3_stm32f_can2 in stm32dev.nut.


> Where to put the __MAY_ALIAS definition?

Good question. The compiler.h part is a big mess. And like with any pile of waste, people tend to put their waste on top of it (me included). ;-)

For the time being I'd suggest to keep it locally. Restructuring compiler.h is on top of my list. I just cleaned up dev/board.h and broke a few things, which I have to fix first.

Regards,

Harald





More information about the En-Nut-Discussion mailing list