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

olimexino-32u4: firmware compilation errors in iceprog (loopProg, loopBridge) #12

Open
r1mk opened this issue Feb 25, 2022 · 2 comments

Comments

@r1mk
Copy link

r1mk commented Feb 25, 2022

Hi,
The firmware compilation using arduino IDE and/or platformio fails (fedora 35 / gcc g++ 11.2.1):
(here with platformio)

src/iceprog.cpp: In function 'void loop()':
src/iceprog.cpp:120:15: error: 'loopProg' was not declared in this scope
   if (isProg) loopProg();
(...)
src/iceprog.cpp:121:8: error: 'loopBridge' was not declared in this scope
   else loopBridge();

proposed solution : add the following declarations in iceprog.cpp (and/or iceprog.ino) after void readpage(uint16_t adr); (L87)

void loopProg(void);
void loopBridge(void);
@DanKoloff
Copy link
Contributor

We haven't tested it with platformio, only Arduino IDE.

Did you download all files?

Did you install SPIMemory library?

@r1mk
Copy link
Author

r1mk commented Feb 25, 2022

Sorry! I was pretty sure that I had the same problem with both "tracks" but the problem seems to affect only platformio.

I've done it again on another machine with arduino 1.6.9 + SPI 2.2.0 added + the original iceprog.ino loaded and the compilation is ok without the fix.
Mea culpa!

The compilation error with platformio is only linked to the code of iceprog.ino (through the src/iceprog.cpp link)
Except for loopBridge() and loopProg() the other important functions are correctly declared at the top of the file (from secerase to readpage). The platformio compiler complains because these 2 only appear below their parent function loop() with no previous declaration.

By the way, iceprog/iceprog.cpp seems to be a broken link file (git thinks it a normal file with a path inside).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants