Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

init.js executed twice

My init.js
print("Hello World");

Is executed twice:

...
mgos_wifi_set_mode   WiFi mode: AP
E (3071) wifi: esp_wifi_set_mode 774 wifi is not init
I (3081) wifi: wifi firmware version: 41eede3
I (3091) wifi: config NVS flash: enabled
I (3091) wifi: config nano formating: disabled
I (3091) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (3091) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (3111) wifi: Init dynamic tx buffer num: 32
I (3121) wifi: Init dynamic rx buffer num: 64
I (3121) wifi: wifi driver task: 3ffbd7a0, prio:23, stack:4096
I (3131) wifi: Init static rx buffer num: 10
I (3141) wifi: Init dynamic rx buffer num: 0
I (3141) wifi: Init rx ampdu len mblock:7
I (3151) wifi: Init lldesc rx ampdu entry mblock:4
I (3151) wifi: wifi power manager task: 0x3ffd027c prio: 21 stack: 2560
...
Hello World 
mgos_app_init        mJS memory stat: before init: 181536 after init: 180100 after init.js: 179892
mgos_init            Init done, RAM: 257456 total, 179892 free, 179828 min free
Hello World 
mongoose_poll        New heap free LWM: 179460

How can I stop this ?

I compile with: mos build --arch esp32

Regards
Holger

Comments

  • rojerrojer Dublin, Ireland

    i bet you have mjs init in your main.c and also attach the mjs library. remove mjs init code from your main, it's no longer needed.

  • Thanks, you were right. I used an old example and only changed mos.yml.

Sign In or Register to comment.