spin2cpp multiple {++ volatile} dat sections error
SRLM
Posts: 5,045
When I convert the following spin file:
I get the following in the .h file:
Which produces
I'm using spin2cpp version 1.04 from the propgcc version alpha_v1_9_0_2042 on Ubuntu 13.04.
... Dat {++ volatile} Power RightPower word 0 LeftPower word 0 ... Dat {++ volatile} org Entry mov dira, OutputMask ' set outputs mov ctra, CTRA_Setting mov ctrb, CTRB_Setting mov frqa, #1 ' frq is added to phs every clock cycle mov frqb, #1 ' so it takes -phs clockcycles to generate a falling edge ...
I get the following in the .h file:
static uint8_t volatile volatile dat[];
Which produces
In file included from eddie_motor_driver.cpp:8:0: eddie_motor_driver.h:25:3: error: duplicate 'volatile' eddie_motor_driver.cpp:19:1: error: duplicate 'volatile'
I'm using spin2cpp version 1.04 from the propgcc version alpha_v1_9_0_2042 on Ubuntu 13.04.
Comments
That said, spin2cpp should handle the multiple declarations, so thanks for the bug report.
Eric