Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation error using latest version #873

Open
GianniDPC opened this issue Aug 26, 2019 · 9 comments

Comments

@GianniDPC
Copy link

commented Aug 26, 2019

fastpin_arm_stm32.h:61:59: error: expected constructor, destructor, or type conversion before '(' token #define _FL_IO(L,C) _RD32(GPIO ## L); __FL_DEFINE_PORT3(L, C, _R(GPIO ## L));

@focalintent

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

For which board/platform?

@focalintent

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

Ah - stm - i’ll take a look

focalintent pushed a commit that referenced this issue Aug 26, 2019
@focalintent

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

Checked in a fix on master (but haven’t spun a new release yet) - try it out and let me know if it helps - I won’t have access to a build environment until later tonight

@GianniDPC

This comment has been minimized.

Copy link
Author

commented Aug 26, 2019

There is another I believe in fastpin.h number 259 and 264.

shouldn't static const void *portAddr() { return (void*)&__t_baseType::r(); } }; be static const void *portAddr() { return (void*)__t_baseType::r(); } }; ?

Otherwise it doesn't compile and throws following error:

fastpin.h:264:74: error: lvalue required as unary '&' operand
           static const void *portAddr() { return (void*)&__t_baseType::r(); } };

Tested without & and my ledstrip seems to work as usual atleast.

@focalintent

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

It’s slightly different for different platforms - that being wrong might not affect all chipsets. I’ll have to poke at that one when I get home tonight, I’m not convinced that removing the & is the right type fix there

@GianniDPC

This comment has been minimized.

Copy link
Author

commented Aug 26, 2019

Ok, take your time.

@focalintent

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

Yeah - your fix for fastpin.h is definitely wrong for pretty much every other platform FastLED supports.

Specifically, which STM32 platform are you building for? Because there's two sets of port definitions depending...

@focalintent

This comment has been minimized.

Copy link
Member

commented Aug 27, 2019

Check out this branch -- https://github.com/FastLED/FastLED/tree/bug873 -- the changes are a bit more extensive, so I didn't want to put them onto master until I had a better idea as to whether or not they worked out

@GianniDPC

This comment has been minimized.

Copy link
Author

commented Aug 27, 2019

Check out this branch -- https://github.com/FastLED/FastLED/tree/bug873 -- the changes are a bit more extensive, so I didn't want to put them onto master until I had a better idea as to whether or not they worked out

I think

typedef volatile uint32_t * port_ptr_t;
typedef uint32_t port_t;

should be outside the template otherwise it isn't accessible outside (starting line 50).

Then the compilation works untill I get the same error message as before:

In static member function 'static const void* __FL_PORT_INFO<0>::portAddr()':
error: lvalue required as unary '&' operand static const void *portAddr() { return (void*)&__t_baseType::r(); } };

Also my platform is STM32F10X_MD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.