I found another issue with the flashing on Windows make flash
...
ESPTOOL2 out/Esp8266/debug/firmware/rom0.bin
SSL support disabled
make[1]: Nothing to be done for `application'.
make[1]: Leaving directory `/c/tools/Sming/samples/Basic_Blink'
Killing Terminal to free COM5
/bin/sh: : command not found
make: [kill_term] Error 127 (ignored)
WriteFlash 0x00000=out/Esp8266/debug/firmware/rboot.bin 0x000fa000=out/Esp8266/debug/firmware/partitions.bin 0x00002000=out/Esp8266/debug/firmware/rom0.bin 0x000fc000=/C/tools/Sming/Sming/Arch/Esp8266/Components/esp8266/ESP8266_NONOS_SDK/bin/esp_init_data_default.bin
Traceback (most recent call last):
File "c:\tools\Sming\Sming\Components\Storage\Tools\hwconfig\hwconfig.py", line 114, in <module>
main()
File "c:\tools\Sming\Sming\Components\Storage\Tools\hwconfig\hwconfig.py", line 106, in main
output = globals()['handle_' + args.command](args, config, part)
File "c:\tools\Sming\Sming\Components\Storage\Tools\hwconfig\hwconfig.py", line 52, in handle_flashcheck
filesize = os.path.getsize(filename)
File "c:\Python310\lib\genericpath.py", line 50, in getsize
return os.stat(filename).st_size
FileNotFoundError: [WinError 3] The system cannot find the path specified: '/C/tools/Sming/Sming/Arch/Esp8266/Components/esp8266/ESP8266_NONOS_SDK/bin/esp_init_data_default.bin'
make: *** [flash] Error 1
The file c:\tools\Sming\Sming\Arch\Esp8266\Components\esp8266\ESP8266_NONOS_SDK\bin\esp_init_data_default.bin
is there, but it looks like it's used somewhere where the path is not inflated into Windows path
#include <Adafruit_BME280_Library>
. Perhaps you could test it?
make config-clean clean components-clean
then rebuild.
filesize = os.path.getsize(fixpath(filename))
. NB. I develop on Windows but haven't encountered this problem - I switched to WSL2 as it's considerably faster. I'll get a fix submitted shortly once I've checked it.
Hello @mikee47 & @slaff, is it possible to add a new method signature for HttpResourceTree::setDefault, which allows to register a default path and a plugin or a list of plugins? I want to secure all registered paths with basic authentication. Currently there is no way to secure the default path.
I found out that I can use
server.path.set("*", handler, plugin)
to set a handler for the default path with a plugin.
Hello. I'm trying to use multiple SPI buses (one for SD card and another one for some ICs). The global SPI object works fine (I setup it on SpiBus::HSPI). But I struggle to set secondary SPI object utilizing VSPI. I declare it with SpiClass spi2
and later try to spi2.setup(SpiBus::SPI3, SDpins);
.
The application builds fine, but on startup I get 392117 [SPI] Bus #3 already assigned
These are the exact init lines for SPI:
SPI.setup(SpiBus::HSPI, spispi);
SPI.begin();
spi2.setup(SpiBus::SPI3, SDpins);
spi2.begin();
@mikee47 , you're correct, as usual. I'm using the SDCard library. I did spi2.begin()
before runTest();
that triggers SDCard_begin(PIN_CARD_SS, SPI_FREQ_LIMIT)
. This was the reason for the 'already assigned' bus.
It is possible that SDCard_begin()
somehow overwrites stuff for the global SPI object? I'm loosing communication with the ICs on SPI's bus after runTest();
.
I write the app with both SPI and spi2 buses and the first time after flashing both the SD card (on spi2) and the ICs on SPI's bus work OK. On the second restart of the board, however, the devices on the SPI bus do not work. I tried also flashinit
and it still has this strange behavior.
Hello @slaff, hello @mikee47, I'm playing with the Basic_Ota sample. I can successfully flash rom0 and rom1. But the spiff partition is only flashed when rom0 is written. When rom1 is written, then I see following message in the console:
Updating...
52062981 Partition 'spiffs1' not found
As there is only one spiffs partition, it is always 'spiffs0'. There is no 'spiffs1'. How can I determine the spiffs partition when rom1 is written?
The spiff partition is determined in the example with following lines:
auto spiffsPart = findSpiffsPartition(part);
if(spiffsPart) {
// use user supplied values (defaults for 4mb flash in hardware config)
otaUpdater->addItem(SPIFFS_URL, spiffsPart, new Storage::PartitionStream(spiffsPart));
}
When part=rom1 then no spiff partition is found and therefore the update is skipped.
Hi guys,
I'm trying to write simple program which will write something to file and then read from it. My attempt compiles but I see unexpected (empty file output). Could I kindly as for some guide?
Storage::Partition dataPart;
String name = F("spiffs0");
dataPart = Storage::findPartition(name);
if(!dataPart) {
debug_w("Partition '%s' not found", name.c_str());
}
spiffs_mount(dataPart);
data.open(F("data.csv"), File::Append | File::ReadWrite);
uint64_t time = RTC.getRtcNanoseconds();
String startString = "=== Start time: ";
startString.concat(time);
startString.concat("\n");
data.write(startString);
data.flush();
Serial.println("Current data:");
String c = data.getContent();
Serial.println(c);
Serial.println("==== Data end");
The output is:
60056 mount() returned 0 (Success)
60673 File system initialised
Current data:
==== Data end
Why I cannot see what I wrote to this file?