I’m getting a compile error message that reads:
"‘sFLASH_WritePage’ was not declared in this scope"
application.cpp 56:57
Here’s the code, DESIRED_TEMP_FLASH_ADDRESS is defined as: #define DESIRED_TEMP_FLASH_ADDRESS 0x80000
{
sFLASH_EraseSector(DESIRED_TEMP_FLASH_ADDRESS);
Serial.println(“Saving temperature to flash”);
uint8_t values[2] = { (uint8_t)desiredTemperature, 0 };
sFLASH_WritePage(values, DESIRED_TEMP_FLASH_ADDRESS, 2);
}
I think the problem is how “values” is defined and passed into sFLASH_WritePage(), but I’m not even sure where that function is declared.
Honestly I don’t even know where to find information on this function: sFLASH_WritePage(). I think it should be in an Adafruit library. Do I need to add a library?
Thanks in advance for any help. I really appreciate it.
-Shittyprogrammer
Some quick background… I’m trying to make a variant of the thermostat here:
using the firmware from their github page here:
I installed the new IDE on windows 8.1 from the download page here:
The files in the firmware folder are:
build.mk
application.cpp
glcdfont.c
Adafruit_LEDBackpack.h
Adafruit_LEDBackpack.cpp
Adafruit_GFX.h
Adafruit_GFX.cpp
These have all been copied to C:\Program Files (x86)\Spark Dev\core-firmware\src which I believe should work. I changed this in the make file:
TARGET_SRC_PATH = src
to
TARGET_SRC_PATH = C:\Program Files (x86)\Spark Dev\core-firmware\src
I’m pretty sure my windows IDE isn’t setup correctly. All I did was run the executable. The web IDE is a pain. I’m not sure how to compile a make file with multiple files on the web-IDE. I’m struggling with the Linux dependencies. If I focus on one that I know works for someone else, then I’m sure I’ll have more luck.
I get the same error when I compile it with the WebIDE, Spark-dev, make from the command line and NetBeans IDE. It’s also doesn’t matter if I use sFLASH_WriteBytes or sFLASH_WritePage. I still get this error:
'sFLASH_WriteBytes' was not declared in this scope
Can anyone help me with this? Is there a work around? What do these functions do?
Where can I find this information instead of asking here?
Also, can ANYONE do me a big favor and, if they can compile this, send me the .bin file? I want to check my hardware to see if it’s working. It would be nice while I’m working on the software side.
Tried to compile, got same result, looks like it is because original function was declared as void sFLASH_WritePage and now is static void sFLASH_WriteBytes, the application can’t call static void sFLASH_WriteBytes if it doesn’t declare as void function in sst25vf_spi.h
I also found the issue that current repository of SPARK Core Firmware doesn’t have spark_wiring_network.cpp in src folder, also build.mk in src is different from the file in spark thermostat project.
I believe those two issues need to be solved to compatible with latest Spark Core Firmware