m-mcgowan / spark-flashee-eeprom

Eeprom emulation using external flash on Particle devices. Includes unit tests cross compiled to regular gcc, and on-device integration tests.
GNU Affero General Public License v3.0
34 stars 8 forks source link

Example doesn't build with Particle cli #21

Closed jefflab closed 8 years ago

jefflab commented 8 years ago

I'm trying to build the filemanager.cpp example using the particle CLI, but I get the following error when I run particle compile electron:

application.cpp:3:27: error: 'FRESULT' has not been declared
 void printError(Print& p, FRESULT result);
                           ^
make[1]: *** [../build/target/user/platform-10application.o] Error 1
make: *** [user] Error 2

Compile failed. Exiting.

Here is the minimal version of the file for reproducing the problem:

#include "application.h"
#include "ff.h"
#include "flashee-eeprom.h"

SYSTEM_MODE(MANUAL);

using namespace Flashee;

FATFS fs;
FRESULT result;

void printError(Print& p, FRESULT result) {
}

void setup()
{
}

void loop()
{
}

My particle.include file looks like this:

#particle.include
# from current dir
application.ino

# and from any subdirectories
flashee/firmware/*.cpp
flashee/firmware/*.h

I'm using the following command to compile:

particle compile electron 

I'm using paticle CLI version 1.8.16

It seems like it should work because FRESULT is defined in ff.cpp, but for some reason I get the error above.

jefflab commented 8 years ago

Deleting the application.h line makes compile complete. closing.