Skip to content

Commit

Permalink
Fixed assert fail when building non-release builds on many boards - #…
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Jun 6, 2023
1 parent 49c916a commit c660ebe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion targets/emscripten/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void jsInit() {

jshInit();
jswHWInit();
jsvInit(0);
jsvInit(JSVAR_CACHE_SIZE);
jsiInit(true);
}

Expand Down
10 changes: 5 additions & 5 deletions targets/esp8266/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ void jshPrintBanner() {
os_printf("Espruino "JS_VERSION"\nFlash map %s, manuf 0x%lx chip 0x%lx\n",
flash_maps[map], (long unsigned int) (fid & 0xff), (long unsigned int)chip);
jsiConsolePrintf(
"Flash map %s, manuf 0x%x chip 0x%x\n",
"Flash map %s, manuf 0x%x chip 0x%x\n",
(( map == 2 && flash_kb[map] == 1024 && ESP_COMBINED_SIZE >= 1024) ? flash_maps_alt[map] : flash_maps[map]),
fid & 0xff, chip);
if ((chip == 0x4013 && map != 0) || (chip == 0x4016 && map != 4 && map != 6)) {
if ((chip == 0x4013 && map != 0) || (chip == 0x4016 && map != 4 && map != 6)) {
jsiConsolePrint("WARNING: *** Your flash chip does not match your flash map ***\n");
}
}
Expand Down Expand Up @@ -259,7 +259,7 @@ static void initDone() {

jshInit(); // Initialize the hardware
jswHWInit();
jsvInit(0); // Initialize the variables
jsvInit(JSVAR_CACHE_SIZE); // Initialize the variables
jsiInit(true); // Initialize the interactive subsystem
// note: the wifi gets hooked-up via wifi_soft_init called from jsiInit

Expand Down Expand Up @@ -328,8 +328,8 @@ void user_rf_pre_init() {
uint32 user_rf_cal_sector_set(void) {
uint32_t rf_cal_sec = 0;
switch (system_get_flash_size_map()) {
case FLASH_SIZE_4M_MAP_256_256:
rf_cal_sec = 128 - 5;
case FLASH_SIZE_4M_MAP_256_256:
rf_cal_sec = 128 - 5;
break;
case FLASH_SIZE_8M_MAP_512_512:
rf_cal_sec = 256 - 5;
Expand Down
7 changes: 3 additions & 4 deletions targets/nrf5x/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Platform Specific entry point
* ----------------------------------------------------------------------------
*/

#include "platform_config.h"
#include "jsinteractive.h"
#include "jshardware.h"
Expand All @@ -31,11 +31,10 @@ int main() {
#ifdef BTN1_PININDEX
buttonState = jshPinGetValue(BTN1_PININDEX) == BTN1_ONSTATE;
#endif
jsvInit(0);
jsvInit(JSVAR_CACHE_SIZE);
jsiInit(!buttonState /* load from flash by default */); // pressing USER button skips autoload

while (1)
{
while (1) {
jsiLoop();
}
//jsiKill();
Expand Down
2 changes: 1 addition & 1 deletion targets/stm32/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main(void){
#ifdef BTN1_PININDEX
buttonState = jshPinInput(BTN1_PININDEX) == BTN1_ONSTATE;
#endif
jsvInit(0);
jsvInit(JSVAR_CACHE_SIZE);
jsiInit(!buttonState); // pressing USER button skips autoload

while (1) {
Expand Down
2 changes: 1 addition & 1 deletion targets/stm32_ll/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(void){
#ifdef BTN1_PININDEX
buttonState = jshPinInput(BTN1_PININDEX) == BTN1_ONSTATE;
#endif
jsvInit(0);
jsvInit(JSVAR_CACHE_SIZE);
jsiInit(!buttonState); // pressing USER button skips autoload

while (1) {
Expand Down

0 comments on commit c660ebe

Please sign in to comment.