├── bin ├── master_device_key.txt ├── blank.bin ├── key.bin ├── boot_v1.1.bin ├── boot_v1.2.bin ├── eagle.flash.bin ├── eagle.irom0text.bin ├── esp_init_data_vdd33.bin ├── eagle.flash_disable_rf.bin ├── esp_init_data_default.bin ├── upgrade │ ├── user1.512.old.bin │ └── user1.512.old_disable_rf.bin ├── esp_init_data_vdd33.bin_40M ├── low_power_sensor_default_bin │ ├── blank.bin │ ├── eagle.irom0text.bin │ ├── esp_init_data_vdd33.bin │ ├── eagle.flash_disable_rf.bin │ ├── esp_init_data_vdd33.bin_40M │ ├── readme.txt │ └── write_flash.sh ├── gen_key_bin.py ├── devicekeys_ULP_sensor │ ├── 1312fe7b287025955266ba5642164d8e34c58825.bin │ ├── 19d81ed280cfe426afbe22d8849277364c5fb652.bin │ ├── 1a674b0abf5da778c74e07e66e88e89787724dfc.bin │ ├── 1d8c1d2efaac55f427c575029d5c3dc37162c6c0.bin │ ├── 1e6223eda2891355611fe69153a296910d69bfe1.bin │ ├── 2c4fd723c2f16f5f0a0ccdee42bfc051af32f198.bin │ ├── 2e0ecd31473113d7b927db1c159e634004c18d9c.bin │ ├── 2e3eb8d817e448a6e0562538d96f0fe3b7491523.bin │ ├── 30a72d0e002420d71adce5eeecea99dbbe89f6d9.bin │ ├── 3150be56bb829794243c8d3c96810b3980f69a2b.bin │ ├── 355b424b5b04a54e5febcad8642f9087062f10e6.bin │ ├── 3739445d260abc7ceafcffeb498c86fadd778292.bin │ ├── 379bcbfc0e8def10d8bd57fd7c5cd79538ff367f.bin │ ├── 3b6e892cd723eaac4b9a3662feb9cb87645dc468.bin │ ├── 3ca045eedf039ccd04dd7ca90ff95fc8eac0a042.bin │ ├── 41dc1061b28c4675a7759444b866eb6578224c02.bin │ ├── 4321bd99bf2054db74531f0aac217c0f3352ac98.bin │ ├── 4640b8c31ced78d2f207c7a8f0dfe4d67d516e08.bin │ ├── 4cf8e02c2de23041c163a04fc86ec502884c4fb7.bin │ ├── 503864dae691f7ee1d430d75e4fcb154b0cc36c7.bin │ ├── 511416f189ca81b6643ccbab6fbfae0a959328aa.bin │ ├── 53c4098f9594a200e63841a189f6d4e93e0bcdcd.bin │ ├── 55b9358e85ac07cd909f608041575b7653b26ade.bin │ ├── 590aab2e9ff28cbe0c9f892d5eab5ae7ad9c1fd1.bin │ ├── 59f92d8cd90534985a7716388d61699c1e84fd11.bin │ ├── 5b522ef53c1b5773f3e9f3e48d0f91efd122d7b4.bin │ ├── 5cc010bc9ba7d6cc7c7d6638d5ad8284a56d2935.bin │ ├── 5e0b40b7b300192e829fe64e3f0f8953103209ad.bin │ ├── 611291ac0776e7a247000747a3894e6a90b1a195.bin │ ├── 68a45ac41ef3675eafc0fe2dae742c3273ce96fa.bin │ ├── 69c62bbf28d73f36eb7daf11eafa4aee01d05f7c.bin │ ├── 6bca1801e38dd3e18472e1f46b06487e2626924f.bin │ ├── 6d1a8612ad1828155b8e1502ce824920c92c316d.bin │ ├── 6dd15dfb944a858cc5f5a8379d0c21c7cb089d7c.bin │ ├── 6ea6964ca9a5004a1a9377022699bd11ffe1f5a7.bin │ ├── 70d75e4857873f6b940da6633a85e676cbe17c41.bin │ ├── 720e6ca904675a596ba312a73e469f03ebcf601a.bin │ ├── 72260589053fe1d6d0515840ff6f2a01d870ccbe.bin │ ├── 72791acb4a18362947a51743e991c5b1b33747c2.bin │ ├── 72847c1aafce98cd38b092268986fcfcd1a1b214.bin │ ├── 729023461ad9fb78df70b8e4cad8041b4f20aafe.bin │ ├── 748f1f3627e174f39d5560049a7d868a44f6d2a8.bin │ ├── 78597104387b72ca6fa55a99ae8e929a573d1de7.bin │ ├── 7aec77fc2f5ea6df2fa43687d21892dbd0f76f1e.bin │ ├── 7bc280151e08ad01df088605e0da5e6921db0f3b.bin │ ├── 7bf23a6b947c7c78e20385ed5b488c4e48de6e5a.bin │ ├── 7e3281674b5e0357e26c326339f3289fb8390938.bin │ ├── 7ef3d1657c4f7a87e842c85659e65923cef54b74.bin │ ├── 802a985ea3565252593981b46f8863ff6445f545.bin │ ├── 8158807b97609ed17cb2045cc58f05b82c14eff9.bin │ ├── 81dcf7eaedfd0e532fc2d268d6ef02cd8a96751e.bin │ ├── 850300c1cd6601bd5b58dbfb43c09d1898c3b122.bin │ ├── 8ac740272ae313ef700a587f9a2fe0cbdc1bf91d.bin │ ├── 8b8a5aa14d367efdd496c5f828b34159e57a7274.bin │ ├── 8c5090b11698b8b59d53e8f9dd77a822cb064d50.bin │ ├── 8cc9ca7a3bfe8f95ae35b5103dae81a2c55be913.bin │ ├── 8f78ffed9b81d044d66caca8cc8217f85ebb08aa.bin │ ├── 9065a1530500e46fc32011cb45c96aedc96f875f.bin │ ├── 9119e7322671ca416dd04bd792599bea62435a0f.bin │ ├── 92fcc03fceb0c015a5552722fe6ffc7eb6474916.bin │ ├── 94be6e380a6f6108347d2a271ba621b32dc359da.bin │ ├── 9884d87c487de6f2738f67776575a8f1e19e9428.bin │ ├── 993f41e99283dfe8159fe0ade55402ddbcaffc00.bin │ ├── 99f9b0b9c7a58ca38627c7819884bdf2cdc85b60.bin │ ├── 9a711512de3b3dd0a545de9cc7b3078a988983fb.bin │ ├── 9d7a138d6ac6bca768dbc5ed5a121ebabf18eed7.bin │ ├── 9e09b6e9af56780b01c3bf65a48e090fe4450a65.bin │ ├── 9efac19539d5dbea2b9fdebe14a0245f0a6470f6.bin │ ├── a04d3ba05ff1fc431dff0a1ac80c53e6f5527cd1.bin │ ├── a1d201f61615839136e30925c907d7d6691ffdf4.bin │ ├── a3005d343bc938997141bf38c33efa6bc9cad014.bin │ ├── a8cb4171813ed2099c3aa9a230c145efd333c759.bin │ ├── b03c9946c691da09f0ab710dad04247df53d014c.bin │ ├── b0aad3f5edbda92681ba248707b7a470b8645c93.bin │ ├── b2e85ad12e1b3ada64bee5966b290e81478829bb.bin │ ├── bbef8d57547e9607b58242a576e214cf0fcb63f6.bin │ ├── bc5215ebce7de8a96f3b9d2e8cae22ca4a05610f.bin │ ├── c17299ecc6a7e3bf6a1984d0c71f78aee89fa673.bin │ ├── c37ba3d2c494fcf82d0f37f616f2febeb0257f2c.bin │ ├── c63e137fae7ac2bfa04b785a33ce4b6d615856dc.bin │ ├── c6937b888053cf7798e26d3c9522e3d6f0b628e2.bin │ ├── c82cea3be5695b9b63165015813f1021810f5f09.bin │ ├── cd29d4071bf14cbee09f68e62dac9191acd91c25.bin │ ├── ce9c4ba672fe888beaf00fcdb753f068c64634e7.bin │ ├── d0f059bb651bc87680730539d19bbb5131f7cab7.bin │ ├── d4665eabfaa39f9d1b3bdcd00c35cc39cc42ebf5.bin │ ├── dcc3aba22f77141f3e390cca58e270c3b5f14b67.bin │ ├── e2f353aad73aade9e3816f2789a1727664268573.bin │ ├── ef9d837492ad9b8781e8b14061895cea3fc02ea2.bin │ ├── f2dada5d39f0aad7f3073e8689abb141dc854d0b.bin │ ├── f38e3770958f99399f0340829880503973b77301.bin │ ├── f3ea80726e8e72b45c2d76fea236ce4b368afa13.bin │ ├── f62b940b69d713a1a743456bffe4937e59075560.bin │ ├── f72acba76e156ad425dc6b6fe030908dd223d36a.bin │ ├── fa98d6d8367de32e4977f4bc246835529d2aee8b.bin │ ├── ff34d55ac4c39070d88551e57929aef9a4865139.bin │ └── ff9ab573d9c48d60c8084759db323e79b93b2db5.bin └── write_flash.sh ├── lib ├── lib.rar ├── libat.a ├── libjson.a ├── liblwip.a ├── libmain.a ├── libphy.a ├── libpp.a ├── libssl.a ├── libwpa.a ├── libmain.rar ├── libphy.rar ├── libnet80211.a ├── libupgrade.a ├── libsmartconfig.a └── libmain_lowpowermode.rar ├── app ├── driver │ ├── .output │ │ └── eagle │ │ │ └── debug │ │ │ ├── obj │ │ │ ├── key.o │ │ │ ├── pwm.o │ │ │ ├── spi.o │ │ │ ├── gpio16.o │ │ │ ├── uart.o │ │ │ ├── i2c_master.o │ │ │ ├── sensor_lp.o │ │ │ ├── gpio16.d │ │ │ ├── uart.d │ │ │ ├── i2c_master.d │ │ │ ├── pwm.d │ │ │ ├── key.d │ │ │ ├── sensor_lp.d │ │ │ └── spi.d │ │ │ └── lib │ │ │ └── libdriver.a │ ├── gpio16.c │ ├── Makefile │ └── sensor_lp.c ├── include │ ├── user_devicefind.h │ ├── user_esp_platform_timer.h │ ├── driver │ │ ├── gpio16.h │ │ ├── key.h │ │ ├── sensor_lp.h │ │ ├── pwm.h │ │ ├── spi.h │ │ ├── i2c_master.h │ │ ├── uart.h │ │ └── uart_register.h │ ├── user_json.h │ ├── user_config.h │ ├── user_light.h │ ├── user_iot_version.h │ ├── user_webserver.h │ ├── user_esp_platform.h │ ├── user_sensor.h │ ├── user_plug.h │ └── ssl │ │ ├── private_key.h │ │ └── cert.h ├── user │ ├── .output │ │ └── eagle │ │ │ └── debug │ │ │ ├── lib │ │ │ └── libuser.a │ │ │ └── obj │ │ │ ├── user_json.o │ │ │ ├── user_light.o │ │ │ ├── user_main.o │ │ │ ├── user_plug.o │ │ │ ├── user_sensor.o │ │ │ ├── user_devicefind.o │ │ │ ├── user_webserver.o │ │ │ ├── user_esp_platform.o │ │ │ ├── user_esp_platform_timer.o │ │ │ ├── user_json.d │ │ │ ├── user_light.d │ │ │ ├── user_plug.d │ │ │ ├── user_sensor.d │ │ │ ├── user_esp_platform_timer.d │ │ │ ├── user_main.d │ │ │ ├── user_devicefind.d │ │ │ ├── user_webserver.d │ │ │ └── user_esp_platform.d │ ├── user_main.c │ ├── Makefile │ ├── user_devicefind.c │ └── user_sensor.c ├── .output │ └── eagle │ │ └── debug │ │ └── image │ │ └── eagle.app.v6.out ├── gen_misc.bat ├── Makefile └── gen_misc.sh ├── README.md ├── readme.txt ├── include ├── smartconfig.h ├── mem.h ├── os_type.h ├── spi_flash.h ├── ping.h ├── ets_sys.h ├── upgrade.h ├── json │ ├── json.h │ └── jsonparse.h ├── osapi.h ├── at_custom.h ├── ip_addr.h ├── gpio.h └── c_types.h ├── scripts ├── setup_AP_information.py ├── get_sensor_voltage.py └── plot_sensor_voltage.py └── ld ├── eagle.app.v6.ld ├── eagle.app.v6.new.1024.app1.ld ├── eagle.app.v6.new.1024.app2.ld ├── eagle.app.v6.new.512.app1.ld ├── eagle.app.v6.new.512.app2.ld └── eagle.app.v6.old.1024.app1.ld /bin/master_device_key.txt: -------------------------------------------------------------------------------- 1 | 68a45ac41ef3675eafc0fe2dae742c3273ce96fa 2 | -------------------------------------------------------------------------------- /bin/blank.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/blank.bin -------------------------------------------------------------------------------- /bin/key.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/key.bin -------------------------------------------------------------------------------- /lib/lib.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/lib.rar -------------------------------------------------------------------------------- /lib/libat.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libat.a -------------------------------------------------------------------------------- /lib/libjson.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libjson.a -------------------------------------------------------------------------------- /lib/liblwip.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/liblwip.a -------------------------------------------------------------------------------- /lib/libmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libmain.a -------------------------------------------------------------------------------- /lib/libphy.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libphy.a -------------------------------------------------------------------------------- /lib/libpp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libpp.a -------------------------------------------------------------------------------- /lib/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libssl.a -------------------------------------------------------------------------------- /lib/libwpa.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libwpa.a -------------------------------------------------------------------------------- /lib/libmain.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libmain.rar -------------------------------------------------------------------------------- /lib/libphy.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libphy.rar -------------------------------------------------------------------------------- /bin/boot_v1.1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/boot_v1.1.bin -------------------------------------------------------------------------------- /bin/boot_v1.2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/boot_v1.2.bin -------------------------------------------------------------------------------- /lib/libnet80211.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libnet80211.a -------------------------------------------------------------------------------- /lib/libupgrade.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libupgrade.a -------------------------------------------------------------------------------- /bin/eagle.flash.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/eagle.flash.bin -------------------------------------------------------------------------------- /lib/libsmartconfig.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libsmartconfig.a -------------------------------------------------------------------------------- /bin/eagle.irom0text.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/eagle.irom0text.bin -------------------------------------------------------------------------------- /bin/esp_init_data_vdd33.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/esp_init_data_vdd33.bin -------------------------------------------------------------------------------- /lib/libmain_lowpowermode.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/lib/libmain_lowpowermode.rar -------------------------------------------------------------------------------- /bin/eagle.flash_disable_rf.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/eagle.flash_disable_rf.bin -------------------------------------------------------------------------------- /bin/esp_init_data_default.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/esp_init_data_default.bin -------------------------------------------------------------------------------- /bin/upgrade/user1.512.old.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/upgrade/user1.512.old.bin -------------------------------------------------------------------------------- /bin/esp_init_data_vdd33.bin_40M: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/esp_init_data_vdd33.bin_40M -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/key.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/key.o -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/pwm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/pwm.o -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/spi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/spi.o -------------------------------------------------------------------------------- /app/include/user_devicefind.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_DEVICEFIND_H__ 2 | #define __USER_DEVICEFIND_H__ 3 | 4 | void user_devicefind_init(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /bin/upgrade/user1.512.old_disable_rf.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/upgrade/user1.512.old_disable_rf.bin -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/gpio16.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/gpio16.o -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/uart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/uart.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/lib/libuser.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/lib/libuser.a -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/blank.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/low_power_sensor_default_bin/blank.bin -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_json.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_json.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_light.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_light.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_main.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_plug.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_plug.o -------------------------------------------------------------------------------- /app/.output/eagle/debug/image/eagle.app.v6.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/.output/eagle/debug/image/eagle.app.v6.out -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/lib/libdriver.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/lib/libdriver.a -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/i2c_master.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/i2c_master.o -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/sensor_lp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/driver/.output/eagle/debug/obj/sensor_lp.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_sensor.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_sensor.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_devicefind.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_devicefind.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_webserver.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_webserver.o -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_esp_platform.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_esp_platform.o -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/eagle.irom0text.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/low_power_sensor_default_bin/eagle.irom0text.bin -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_esp_platform_timer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/app/user/.output/eagle/debug/obj/user_esp_platform_timer.o -------------------------------------------------------------------------------- /bin/gen_key_bin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | f = open('master_device_key.txt','r') 4 | key = f.readline().strip() 5 | 6 | g = open('key.bin','w') 7 | g.write('{:\xFF<128}'.format(key)) 8 | -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/esp_init_data_vdd33.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/low_power_sensor_default_bin/esp_init_data_vdd33.bin -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/eagle.flash_disable_rf.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/low_power_sensor_default_bin/eagle.flash_disable_rf.bin -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/esp_init_data_vdd33.bin_40M: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/low_power_sensor_default_bin/esp_init_data_vdd33.bin_40M -------------------------------------------------------------------------------- /app/include/user_esp_platform_timer.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_DEVICEFIND_H__ 2 | #define __USER_DEVICEFIND_H__ 3 | 4 | void user_platform_timer_start(char* pbuffer, struct espconn *pespconn); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/1312fe7b287025955266ba5642164d8e34c58825.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/1312fe7b287025955266ba5642164d8e34c58825.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/19d81ed280cfe426afbe22d8849277364c5fb652.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/19d81ed280cfe426afbe22d8849277364c5fb652.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/1a674b0abf5da778c74e07e66e88e89787724dfc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/1a674b0abf5da778c74e07e66e88e89787724dfc.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/1d8c1d2efaac55f427c575029d5c3dc37162c6c0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/1d8c1d2efaac55f427c575029d5c3dc37162c6c0.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/1e6223eda2891355611fe69153a296910d69bfe1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/1e6223eda2891355611fe69153a296910d69bfe1.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/2c4fd723c2f16f5f0a0ccdee42bfc051af32f198.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/2c4fd723c2f16f5f0a0ccdee42bfc051af32f198.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/2e0ecd31473113d7b927db1c159e634004c18d9c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/2e0ecd31473113d7b927db1c159e634004c18d9c.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/2e3eb8d817e448a6e0562538d96f0fe3b7491523.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/2e3eb8d817e448a6e0562538d96f0fe3b7491523.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/30a72d0e002420d71adce5eeecea99dbbe89f6d9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/30a72d0e002420d71adce5eeecea99dbbe89f6d9.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/3150be56bb829794243c8d3c96810b3980f69a2b.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/3150be56bb829794243c8d3c96810b3980f69a2b.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/355b424b5b04a54e5febcad8642f9087062f10e6.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/355b424b5b04a54e5febcad8642f9087062f10e6.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/3739445d260abc7ceafcffeb498c86fadd778292.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/3739445d260abc7ceafcffeb498c86fadd778292.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/379bcbfc0e8def10d8bd57fd7c5cd79538ff367f.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/379bcbfc0e8def10d8bd57fd7c5cd79538ff367f.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/3b6e892cd723eaac4b9a3662feb9cb87645dc468.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/3b6e892cd723eaac4b9a3662feb9cb87645dc468.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/3ca045eedf039ccd04dd7ca90ff95fc8eac0a042.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/3ca045eedf039ccd04dd7ca90ff95fc8eac0a042.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/41dc1061b28c4675a7759444b866eb6578224c02.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/41dc1061b28c4675a7759444b866eb6578224c02.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/4321bd99bf2054db74531f0aac217c0f3352ac98.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/4321bd99bf2054db74531f0aac217c0f3352ac98.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/4640b8c31ced78d2f207c7a8f0dfe4d67d516e08.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/4640b8c31ced78d2f207c7a8f0dfe4d67d516e08.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/4cf8e02c2de23041c163a04fc86ec502884c4fb7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/4cf8e02c2de23041c163a04fc86ec502884c4fb7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/503864dae691f7ee1d430d75e4fcb154b0cc36c7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/503864dae691f7ee1d430d75e4fcb154b0cc36c7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/511416f189ca81b6643ccbab6fbfae0a959328aa.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/511416f189ca81b6643ccbab6fbfae0a959328aa.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/53c4098f9594a200e63841a189f6d4e93e0bcdcd.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/53c4098f9594a200e63841a189f6d4e93e0bcdcd.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/55b9358e85ac07cd909f608041575b7653b26ade.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/55b9358e85ac07cd909f608041575b7653b26ade.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/590aab2e9ff28cbe0c9f892d5eab5ae7ad9c1fd1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/590aab2e9ff28cbe0c9f892d5eab5ae7ad9c1fd1.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/59f92d8cd90534985a7716388d61699c1e84fd11.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/59f92d8cd90534985a7716388d61699c1e84fd11.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/5b522ef53c1b5773f3e9f3e48d0f91efd122d7b4.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/5b522ef53c1b5773f3e9f3e48d0f91efd122d7b4.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/5cc010bc9ba7d6cc7c7d6638d5ad8284a56d2935.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/5cc010bc9ba7d6cc7c7d6638d5ad8284a56d2935.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/5e0b40b7b300192e829fe64e3f0f8953103209ad.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/5e0b40b7b300192e829fe64e3f0f8953103209ad.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/611291ac0776e7a247000747a3894e6a90b1a195.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/611291ac0776e7a247000747a3894e6a90b1a195.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/68a45ac41ef3675eafc0fe2dae742c3273ce96fa.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/68a45ac41ef3675eafc0fe2dae742c3273ce96fa.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/69c62bbf28d73f36eb7daf11eafa4aee01d05f7c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/69c62bbf28d73f36eb7daf11eafa4aee01d05f7c.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/6bca1801e38dd3e18472e1f46b06487e2626924f.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/6bca1801e38dd3e18472e1f46b06487e2626924f.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/6d1a8612ad1828155b8e1502ce824920c92c316d.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/6d1a8612ad1828155b8e1502ce824920c92c316d.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/6dd15dfb944a858cc5f5a8379d0c21c7cb089d7c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/6dd15dfb944a858cc5f5a8379d0c21c7cb089d7c.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/6ea6964ca9a5004a1a9377022699bd11ffe1f5a7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/6ea6964ca9a5004a1a9377022699bd11ffe1f5a7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/70d75e4857873f6b940da6633a85e676cbe17c41.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/70d75e4857873f6b940da6633a85e676cbe17c41.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/720e6ca904675a596ba312a73e469f03ebcf601a.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/720e6ca904675a596ba312a73e469f03ebcf601a.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/72260589053fe1d6d0515840ff6f2a01d870ccbe.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/72260589053fe1d6d0515840ff6f2a01d870ccbe.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/72791acb4a18362947a51743e991c5b1b33747c2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/72791acb4a18362947a51743e991c5b1b33747c2.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/72847c1aafce98cd38b092268986fcfcd1a1b214.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/72847c1aafce98cd38b092268986fcfcd1a1b214.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/729023461ad9fb78df70b8e4cad8041b4f20aafe.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/729023461ad9fb78df70b8e4cad8041b4f20aafe.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/748f1f3627e174f39d5560049a7d868a44f6d2a8.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/748f1f3627e174f39d5560049a7d868a44f6d2a8.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/78597104387b72ca6fa55a99ae8e929a573d1de7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/78597104387b72ca6fa55a99ae8e929a573d1de7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/7aec77fc2f5ea6df2fa43687d21892dbd0f76f1e.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/7aec77fc2f5ea6df2fa43687d21892dbd0f76f1e.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/7bc280151e08ad01df088605e0da5e6921db0f3b.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/7bc280151e08ad01df088605e0da5e6921db0f3b.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/7bf23a6b947c7c78e20385ed5b488c4e48de6e5a.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/7bf23a6b947c7c78e20385ed5b488c4e48de6e5a.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/7e3281674b5e0357e26c326339f3289fb8390938.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/7e3281674b5e0357e26c326339f3289fb8390938.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/7ef3d1657c4f7a87e842c85659e65923cef54b74.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/7ef3d1657c4f7a87e842c85659e65923cef54b74.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/802a985ea3565252593981b46f8863ff6445f545.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/802a985ea3565252593981b46f8863ff6445f545.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/8158807b97609ed17cb2045cc58f05b82c14eff9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/8158807b97609ed17cb2045cc58f05b82c14eff9.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/81dcf7eaedfd0e532fc2d268d6ef02cd8a96751e.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/81dcf7eaedfd0e532fc2d268d6ef02cd8a96751e.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/850300c1cd6601bd5b58dbfb43c09d1898c3b122.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/850300c1cd6601bd5b58dbfb43c09d1898c3b122.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/8ac740272ae313ef700a587f9a2fe0cbdc1bf91d.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/8ac740272ae313ef700a587f9a2fe0cbdc1bf91d.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/8b8a5aa14d367efdd496c5f828b34159e57a7274.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/8b8a5aa14d367efdd496c5f828b34159e57a7274.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/8c5090b11698b8b59d53e8f9dd77a822cb064d50.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/8c5090b11698b8b59d53e8f9dd77a822cb064d50.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/8cc9ca7a3bfe8f95ae35b5103dae81a2c55be913.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/8cc9ca7a3bfe8f95ae35b5103dae81a2c55be913.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/8f78ffed9b81d044d66caca8cc8217f85ebb08aa.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/8f78ffed9b81d044d66caca8cc8217f85ebb08aa.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9065a1530500e46fc32011cb45c96aedc96f875f.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9065a1530500e46fc32011cb45c96aedc96f875f.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9119e7322671ca416dd04bd792599bea62435a0f.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9119e7322671ca416dd04bd792599bea62435a0f.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/92fcc03fceb0c015a5552722fe6ffc7eb6474916.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/92fcc03fceb0c015a5552722fe6ffc7eb6474916.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/94be6e380a6f6108347d2a271ba621b32dc359da.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/94be6e380a6f6108347d2a271ba621b32dc359da.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9884d87c487de6f2738f67776575a8f1e19e9428.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9884d87c487de6f2738f67776575a8f1e19e9428.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/993f41e99283dfe8159fe0ade55402ddbcaffc00.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/993f41e99283dfe8159fe0ade55402ddbcaffc00.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/99f9b0b9c7a58ca38627c7819884bdf2cdc85b60.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/99f9b0b9c7a58ca38627c7819884bdf2cdc85b60.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9a711512de3b3dd0a545de9cc7b3078a988983fb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9a711512de3b3dd0a545de9cc7b3078a988983fb.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9d7a138d6ac6bca768dbc5ed5a121ebabf18eed7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9d7a138d6ac6bca768dbc5ed5a121ebabf18eed7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9e09b6e9af56780b01c3bf65a48e090fe4450a65.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9e09b6e9af56780b01c3bf65a48e090fe4450a65.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/9efac19539d5dbea2b9fdebe14a0245f0a6470f6.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/9efac19539d5dbea2b9fdebe14a0245f0a6470f6.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/a04d3ba05ff1fc431dff0a1ac80c53e6f5527cd1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/a04d3ba05ff1fc431dff0a1ac80c53e6f5527cd1.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/a1d201f61615839136e30925c907d7d6691ffdf4.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/a1d201f61615839136e30925c907d7d6691ffdf4.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/a3005d343bc938997141bf38c33efa6bc9cad014.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/a3005d343bc938997141bf38c33efa6bc9cad014.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/a8cb4171813ed2099c3aa9a230c145efd333c759.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/a8cb4171813ed2099c3aa9a230c145efd333c759.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/b03c9946c691da09f0ab710dad04247df53d014c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/b03c9946c691da09f0ab710dad04247df53d014c.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/b0aad3f5edbda92681ba248707b7a470b8645c93.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/b0aad3f5edbda92681ba248707b7a470b8645c93.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/b2e85ad12e1b3ada64bee5966b290e81478829bb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/b2e85ad12e1b3ada64bee5966b290e81478829bb.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/bbef8d57547e9607b58242a576e214cf0fcb63f6.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/bbef8d57547e9607b58242a576e214cf0fcb63f6.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/bc5215ebce7de8a96f3b9d2e8cae22ca4a05610f.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/bc5215ebce7de8a96f3b9d2e8cae22ca4a05610f.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/c17299ecc6a7e3bf6a1984d0c71f78aee89fa673.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/c17299ecc6a7e3bf6a1984d0c71f78aee89fa673.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/c37ba3d2c494fcf82d0f37f616f2febeb0257f2c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/c37ba3d2c494fcf82d0f37f616f2febeb0257f2c.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/c63e137fae7ac2bfa04b785a33ce4b6d615856dc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/c63e137fae7ac2bfa04b785a33ce4b6d615856dc.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/c6937b888053cf7798e26d3c9522e3d6f0b628e2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/c6937b888053cf7798e26d3c9522e3d6f0b628e2.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/c82cea3be5695b9b63165015813f1021810f5f09.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/c82cea3be5695b9b63165015813f1021810f5f09.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/cd29d4071bf14cbee09f68e62dac9191acd91c25.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/cd29d4071bf14cbee09f68e62dac9191acd91c25.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/ce9c4ba672fe888beaf00fcdb753f068c64634e7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/ce9c4ba672fe888beaf00fcdb753f068c64634e7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/d0f059bb651bc87680730539d19bbb5131f7cab7.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/d0f059bb651bc87680730539d19bbb5131f7cab7.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/d4665eabfaa39f9d1b3bdcd00c35cc39cc42ebf5.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/d4665eabfaa39f9d1b3bdcd00c35cc39cc42ebf5.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/dcc3aba22f77141f3e390cca58e270c3b5f14b67.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/dcc3aba22f77141f3e390cca58e270c3b5f14b67.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/e2f353aad73aade9e3816f2789a1727664268573.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/e2f353aad73aade9e3816f2789a1727664268573.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/ef9d837492ad9b8781e8b14061895cea3fc02ea2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/ef9d837492ad9b8781e8b14061895cea3fc02ea2.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/f2dada5d39f0aad7f3073e8689abb141dc854d0b.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/f2dada5d39f0aad7f3073e8689abb141dc854d0b.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/f38e3770958f99399f0340829880503973b77301.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/f38e3770958f99399f0340829880503973b77301.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/f3ea80726e8e72b45c2d76fea236ce4b368afa13.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/f3ea80726e8e72b45c2d76fea236ce4b368afa13.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/f62b940b69d713a1a743456bffe4937e59075560.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/f62b940b69d713a1a743456bffe4937e59075560.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/f72acba76e156ad425dc6b6fe030908dd223d36a.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/f72acba76e156ad425dc6b6fe030908dd223d36a.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/fa98d6d8367de32e4977f4bc246835529d2aee8b.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/fa98d6d8367de32e4977f4bc246835529d2aee8b.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/ff34d55ac4c39070d88551e57929aef9a4865139.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/ff34d55ac4c39070d88551e57929aef9a4865139.bin -------------------------------------------------------------------------------- /bin/devicekeys_ULP_sensor/ff9ab573d9c48d60c8084759db323e79b93b2db5.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EspressifSystems/low_power_voltage_measurement/HEAD/bin/devicekeys_ULP_sensor/ff9ab573d9c48d60c8084759db323e79b93b2db5.bin -------------------------------------------------------------------------------- /app/include/driver/gpio16.h: -------------------------------------------------------------------------------- 1 | #ifndef __GPIO16_H__ 2 | #define __GPIO16_H__ 3 | 4 | void gpio16_output_conf(void); 5 | void gpio16_output_set(uint8 value); 6 | void gpio16_input_conf(void); 7 | uint8 gpio16_input_get(void); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/readme.txt: -------------------------------------------------------------------------------- 1 | This is a default bin compiled by the demo 2 | 3 | download: 4 | 5 | eagle.flash_disable_rf.bin -> 0x0 6 | eagle.irom0text.bin -> 0x40000 7 | esp_init_data_vdd33.bin -> 0x7c000 8 | blank.bin -> 0x7e000 9 | device_master_key -> 0x3e000 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bin/write_flash.sh: -------------------------------------------------------------------------------- 1 | python ../tools/add_disable_rf_cmd.py eagle.flash.bin 2 | ../tools/esptool.py --port /dev/tty.usbserial-AL00ALCV write_flash \ 3 | 0x00000 eagle.flash_disable_rf.bin \ 4 | 0x40000 eagle.irom0text.bin \ 5 | 0x7c000 esp_init_data_vdd33.bin \ 6 | 0x7e000 blank.bin \ 7 | 0x3e000 key.bin 8 | -------------------------------------------------------------------------------- /bin/low_power_sensor_default_bin/write_flash.sh: -------------------------------------------------------------------------------- 1 | ../../tools/esptool.py --port /dev/tty.usbserial-AL00D9W2 write_flash \ 2 | 0x00000 eagle.flash_disable_rf.bin \ 3 | 0x40000 eagle.irom0text.bin \ 4 | 0x7c000 esp_init_data_vdd33.bin_40M \ 5 | 0x7e000 blank.bin \ 6 | 0x3e000 ../devicekeys_ULP_sensor/68a45ac41ef3675eafc0fe2dae742c3273ce96fa.bin 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Low Power Voltage Measurement 2 | 3 | This is a project for ESP8266 for low power sensor applications. 4 | The chip powers on once every 1 minute to measure it's own power supply, 5 | and sends the data to the server, once every 20 minutes. Of course, you 6 | can configure the chip to do other things such as measuring temperature or 7 | humidity, etc. 8 | 9 | The project is now based on Espressif's SDK version 1.0.1b. More details 10 | about the project can be found in the Wiki. 11 | -------------------------------------------------------------------------------- /app/include/user_json.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_JSON_H__ 2 | #define __USER_JSON_H__ 3 | 4 | #include "json/jsonparse.h" 5 | #include "json/jsontree.h" 6 | 7 | #define jsonSize 2*1024 8 | 9 | void json_parse(struct jsontree_context *json, char *ptrJSONMessage); 10 | 11 | void json_ws_send(struct jsontree_value *tree, const char *path, char *pbuf); 12 | 13 | int json_putchar(int c); 14 | 15 | struct jsontree_value *find_json_path(struct jsontree_context *json, const char *path); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | low power sensor demo: 2 | 3 | 1.put these file to sdk root path 4 | 2.compile: support flash.bin+rom.bin and bootv1.1.bin+user.bin 5 | 3.download: 6 | eagle.flash_disable_rf.bin -> 0x0 7 | eagle.irom0text.bin -> 0x40000 8 | esp_init_data_vdd33.bin -> 0x7c000 9 | blank.bin -> 0x7e000 10 | device_master_key -> 0x3e000 11 | 12 | or: 13 | user1.512.old_disable_rf.bin ->0x1000 14 | bootv1.1.bin -> 0x0 15 | blank.bin -> 0x7e000 16 | device_master_key -> 0x3e000 17 | esp_init_data_vdd33.bin -> 0x7c000 18 | 19 | 20 | -------------------------------------------------------------------------------- /app/include/user_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_CONFIG_H__ 2 | #define __USER_CONFIG_H__ 3 | 4 | #define ESP_PLATFORM 1 5 | #define SENSOR_DEVICE 1 6 | #define HUMITURE_SUB_DEVICE 1 7 | #define USE_DNS 8 | #define ESP_DOMAIN "iot.espressif.cn" 9 | #define SENSOR_DEEP_SLEEP 10 | #define LOW_POWER_MODE 11 | #define SENSOR_DEEP_SLEEP_TIME 6000000 // deep sleep time 12 | #define SENSOR_CONNECT_TIME 2000000 // max connect time 13 | #define AP_CACHE 1 14 | #define AP_CACHE_NUMBER 5 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/smartconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 -2018 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __SMARTCONFIG_H__ 7 | #define __SMARTCONFIG_H__ 8 | 9 | typedef void (*sc_callback_t)(void *data); 10 | 11 | typedef enum { 12 | SC_STATUS_WAIT = 0, 13 | SC_STATUS_FIND_CHANNEL, 14 | SC_STATUS_GETTING_SSID_PSWD, 15 | SC_STATUS_GOT_SSID_PSWD, 16 | SC_STATUS_LINK, 17 | SC_STATUS_LINK_OVER, 18 | } sc_status; 19 | 20 | typedef enum { 21 | SC_TYPE_ESPTOUCH = 0, 22 | SC_TYPE_AIRKISS, 23 | } sc_type; 24 | 25 | sc_status smartconfig_get_status(void); 26 | const char *smartconfig_get_version(void); 27 | bool smartconfig_start(sc_type type, sc_callback_t cb, ...); 28 | bool smartconfig_stop(void); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /app/include/driver/key.h: -------------------------------------------------------------------------------- 1 | #ifndef __KEY_H__ 2 | #define __KEY_H__ 3 | 4 | #include "gpio.h" 5 | 6 | typedef void (* key_function)(void); 7 | 8 | struct single_key_param { 9 | uint8 key_level; 10 | uint8 gpio_id; 11 | uint8 gpio_func; 12 | uint32 gpio_name; 13 | os_timer_t key_5s; 14 | os_timer_t key_50ms; 15 | key_function short_press; 16 | key_function long_press; 17 | }; 18 | 19 | struct keys_param { 20 | uint8 key_num; 21 | struct single_key_param **single_key; 22 | }; 23 | 24 | struct single_key_param *key_init_single(uint8 gpio_id, uint32 gpio_name, uint8 gpio_func, key_function long_press, key_function short_press); 25 | void key_init(struct keys_param *key); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /app/include/user_light.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_LIGHT_H__ 2 | #define __USER_LIGHT_H__ 3 | 4 | #include "driver/pwm.h" 5 | 6 | /* NOTICE---this is for 512KB spi flash. 7 | * you can change to other sector if you use other size spi flash. */ 8 | #define PRIV_PARAM_START_SEC 0x3C 9 | 10 | #define PRIV_PARAM_SAVE 0 11 | 12 | #define LIGHT_RED 0 13 | #define LIGHT_GREEN 1 14 | #define LIGHT_BLUE 2 15 | #define LIGHE_LEVEL 3 16 | 17 | struct light_saved_param { 18 | uint16 pwm_freq; 19 | uint8 pwm_duty[PWM_CHANNEL]; 20 | uint8 pad[6-PWM_CHANNEL]; 21 | }; 22 | 23 | void user_light_init(void); 24 | uint8 user_light_get_duty(uint8 channel); 25 | void user_light_set_duty(uint8 duty, uint8 channel); 26 | uint16 user_light_get_freq(void); 27 | void user_light_set_freq(uint16 freq); 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /app/include/user_iot_version.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_IOT_VERSION_H__ 2 | #define __USER_IOT_VERSION_H__ 3 | 4 | #include "user_config.h" 5 | 6 | #define IOT_VERSION_MAJOR 1U 7 | #define IOT_VERSION_MINOR 0U 8 | #define IOT_VERSION_REVISION 1U 9 | 10 | #define VERSION_NUM (IOT_VERSION_MAJOR * 1000 + IOT_VERSION_MINOR * 100 + IOT_VERSION_REVISION) 11 | 12 | #define VERSION_TYPE "b" 13 | //#define VERSION_TYPE "v" 14 | 15 | #define device_type 12335 16 | 17 | 18 | #define ONLINE_UPGRADE 0 19 | #define LOCAL_UPGRADE 0 20 | #define ALL_UPGRADE 1 21 | #define NONE_UPGRADE 0 22 | 23 | #if ONLINE_UPGRADE 24 | #define UPGRADE_FALG "O" 25 | #elif LOCAL_UPGRADE 26 | #define UPGRADE_FALG "l" 27 | #elif ALL_UPGRADE 28 | #define UPGRADE_FALG "a" 29 | #elif NONE_UPGRADE 30 | #define UPGRADE_FALG "n" 31 | #endif 32 | 33 | #define IOT_VERSION 34 | 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /app/include/driver/sensor_lp.h: -------------------------------------------------------------------------------- 1 | #ifndef _SENSOR_LP_H 2 | #define _SENSOR_LP_H 3 | 4 | #define DBG os_printf 5 | 6 | #define SENSOR_DATA_NUM 20 7 | #define SENSOR_DATA_MEM_ADDR 120 8 | #define INIT_MAGIC 0x7e7e55aa 9 | 10 | #define RTC_CNT_ADDR 120 11 | #define DSLEEP_TIME SENSOR_DEEP_SLEEP_TIME 12 | #define SENSOR_DATA_SET_LEN 50 // max LEN OF STR LIKE : {"x":1,"y":351} 13 | #define SENSOR_DATA_STREAM "supply-voltage" //in accord with the data-point name on the server 14 | #define __SET__DEEP_SLEEP__WAKEUP_NO_RF__ system_deep_sleep_set_option(4) 15 | #define __SET__DEEP_SLEEP__WAKEUP_NORMAL__ system_deep_sleep_set_option(1) 16 | 17 | 18 | typedef struct{ 19 | uint32 init_flg; 20 | uint16 cnt; 21 | uint16 wifi_config; 22 | uint16 data[SENSOR_DATA_NUM]; 23 | }SENSOR_DATA_RTC_MEM; 24 | 25 | 26 | void data_func(); 27 | SENSOR_DATA_RTC_MEM* get_sensor_data(); 28 | 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /app/include/user_webserver.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_WEBSERVER_H__ 2 | #define __USER_WEBSERVER_H__ 3 | 4 | #define SERVER_PORT 80 5 | #define SERVER_SSL_PORT 443 6 | 7 | #define URLSize 10 8 | 9 | typedef enum Result_Resp { 10 | RespFail = 0, 11 | RespSuc, 12 | } Result_Resp; 13 | 14 | typedef enum ProtocolType { 15 | GET = 0, 16 | POST, 17 | } ProtocolType; 18 | 19 | typedef enum _ParmType { 20 | SWITCH_STATUS = 0, 21 | INFOMATION, 22 | WIFI, 23 | SCAN, 24 | REBOOT, 25 | DEEP_SLEEP, 26 | LIGHT_STATUS, 27 | CONNECT_STATUS, 28 | USER_BIN 29 | } ParmType; 30 | 31 | typedef struct URL_Frame { 32 | enum ProtocolType Type; 33 | char pSelect[URLSize]; 34 | char pCommand[URLSize]; 35 | char pFilename[URLSize]; 36 | } URL_Frame; 37 | 38 | typedef struct _rst_parm { 39 | ParmType parmtype; 40 | struct espconn *pespconn; 41 | } rst_parm; 42 | 43 | void user_webserver_init(uint32 port); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /app/include/user_esp_platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_DEVICE_H__ 2 | #define __USER_DEVICE_H__ 3 | 4 | /* NOTICE---this is for 512KB spi flash. 5 | * you can change to other sector if you use other size spi flash. */ 6 | #define ESP_PARAM_START_SEC 0x3C 7 | 8 | #define ESP_PARAM_SAVE_0 1 9 | #define ESP_PARAM_SAVE_1 2 10 | #define ESP_PARAM_FLAG 3 11 | 12 | #define packet_size (2 * 1024) 13 | 14 | #define token_size 41 15 | 16 | struct esp_platform_saved_param { 17 | uint8 devkey[40]; 18 | uint8 token[40]; 19 | uint8 activeflag; 20 | uint8 pad[3]; 21 | }; 22 | 23 | struct esp_platform_sec_flag_param { 24 | uint8 flag; 25 | uint8 pad[3]; 26 | }; 27 | 28 | enum { 29 | DEVICE_CONNECTING = 40, 30 | DEVICE_ACTIVE_DONE, 31 | DEVICE_ACTIVE_FAIL, 32 | DEVICE_CONNECT_SERVER_FAIL 33 | }; 34 | struct dhcp_client_info { 35 | ip_addr_t ip_addr; 36 | ip_addr_t netmask; 37 | ip_addr_t gw; 38 | uint8 flag; 39 | uint8 pad[3]; 40 | }; 41 | #endif 42 | -------------------------------------------------------------------------------- /app/include/user_sensor.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_SENSOR_H__ 2 | #define __USER_SENSOR_H__ 3 | 4 | #include "user_config.h" 5 | #include "driver/key.h" 6 | 7 | #define SENSOR_KEY_NUM 1 8 | 9 | #define SENSOR_KEY_IO_MUX PERIPHS_IO_MUX_MTCK_U 10 | #define SENSOR_KEY_IO_NUM 13 11 | #define SENSOR_KEY_IO_FUNC FUNC_GPIO13 12 | 13 | #define SENSOR_WIFI_LED_IO_MUX PERIPHS_IO_MUX_GPIO0_U 14 | #define SENSOR_WIFI_LED_IO_NUM 0 15 | #define SENSOR_WIFI_LED_IO_FUNC FUNC_GPIO0 16 | 17 | #define SENSOR_LINK_LED_IO_MUX PERIPHS_IO_MUX_MTDI_U 18 | #define SENSOR_LINK_LED_IO_NUM 12 19 | #define SENSOR_LINK_LED_IO_FUNC FUNC_GPIO12 20 | 21 | #define SENSOR_UNUSED_LED_IO_MUX PERIPHS_IO_MUX_MTDO_U 22 | #define SENSOR_UNUSED_LED_IO_NUM 15 23 | #define SENSOR_UNUSED_LED_IO_FUNC FUNC_GPIO15 24 | 25 | #if HUMITURE_SUB_DEVICE 26 | bool user_mvh3004_read_th(uint8 *data); 27 | void user_mvh3004_init(void); 28 | #endif 29 | 30 | void user_sensor_init(uint8 active); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /app/include/driver/pwm.h: -------------------------------------------------------------------------------- 1 | #ifndef __PWM_H__ 2 | #define __PWM_H__ 3 | 4 | #define PWM_CHANNEL 3 5 | 6 | struct pwm_single_param { 7 | uint16 gpio_set; 8 | uint16 gpio_clear; 9 | uint16 h_time; 10 | }; 11 | 12 | struct pwm_param { 13 | uint16 period; 14 | uint16 freq; 15 | uint8 duty[PWM_CHANNEL]; 16 | }; 17 | 18 | #define PWM_DEPTH 255 19 | 20 | #define PWM_1S 1000000 21 | 22 | #define PWM_0_OUT_IO_MUX PERIPHS_IO_MUX_MTDI_U 23 | #define PWM_0_OUT_IO_NUM 12 24 | #define PWM_0_OUT_IO_FUNC FUNC_GPIO12 25 | 26 | #define PWM_1_OUT_IO_MUX PERIPHS_IO_MUX_MTDO_U 27 | #define PWM_1_OUT_IO_NUM 15 28 | #define PWM_1_OUT_IO_FUNC FUNC_GPIO15 29 | 30 | #define PWM_2_OUT_IO_MUX PERIPHS_IO_MUX_MTCK_U 31 | #define PWM_2_OUT_IO_NUM 13 32 | #define PWM_2_OUT_IO_FUNC FUNC_GPIO13 33 | 34 | void pwm_init(uint16 freq, uint8 *duty); 35 | void pwm_start(void); 36 | 37 | void pwm_set_duty(uint8 duty, uint8 channel); 38 | uint8 pwm_get_duty(uint8 channel); 39 | void pwm_set_freq(uint16 freq); 40 | uint16 pwm_get_freq(void); 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /app/include/user_plug.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_ESPSWITCH_H__ 2 | #define __USER_ESPSWITCH_H__ 3 | 4 | #include "driver/key.h" 5 | 6 | /* NOTICE---this is for 512KB spi flash. 7 | * you can change to other sector if you use other size spi flash. */ 8 | #define PRIV_PARAM_START_SEC 0x3C 9 | 10 | #define PRIV_PARAM_SAVE 0 11 | 12 | #define PLUG_KEY_NUM 1 13 | 14 | #define PLUG_KEY_0_IO_MUX PERIPHS_IO_MUX_MTCK_U 15 | #define PLUG_KEY_0_IO_NUM 13 16 | #define PLUG_KEY_0_IO_FUNC FUNC_GPIO13 17 | 18 | #define PLUG_WIFI_LED_IO_MUX PERIPHS_IO_MUX_GPIO0_U 19 | #define PLUG_WIFI_LED_IO_NUM 0 20 | #define PLUG_WIFI_LED_IO_FUNC FUNC_GPIO0 21 | 22 | #define PLUG_LINK_LED_IO_MUX PERIPHS_IO_MUX_MTDI_U 23 | #define PLUG_LINK_LED_IO_NUM 12 24 | #define PLUG_LINK_LED_IO_FUNC FUNC_GPIO12 25 | 26 | #define PLUG_RELAY_LED_IO_MUX PERIPHS_IO_MUX_MTDO_U 27 | #define PLUG_RELAY_LED_IO_NUM 15 28 | #define PLUG_RELAY_LED_IO_FUNC FUNC_GPIO15 29 | 30 | #define PLUG_STATUS_OUTPUT(pin, on) GPIO_OUTPUT_SET(pin, on) 31 | 32 | struct plug_saved_param { 33 | uint8_t status; 34 | uint8_t pad[3]; 35 | }; 36 | 37 | void user_plug_init(void); 38 | uint8 user_plug_get_status(void); 39 | void user_plug_set_status(bool status); 40 | 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /app/include/driver/spi.h: -------------------------------------------------------------------------------- 1 | #ifndef SPI_APP_H 2 | #define SPI_APP_H 3 | 4 | #include "spi_register.h" 5 | #include "ets_sys.h" 6 | #include "osapi.h" 7 | #include "uart.h" 8 | #include "os_type.h" 9 | 10 | /*SPI number define*/ 11 | #define SPI 0 12 | #define HSPI 1 13 | 14 | 15 | 16 | //lcd drive function 17 | void spi_lcd_mode_init(uint8 spi_no); 18 | void spi_lcd_9bit_write(uint8 spi_no,uint8 high_bit,uint8 low_8bit); 19 | 20 | //spi master init funtion 21 | void spi_master_init(uint8 spi_no); 22 | //use spi send 8bit data 23 | void spi_mast_byte_write(uint8 spi_no,uint8 data); 24 | 25 | //transmit data to esp8266 slave buffer,which needs 16bit transmission , 26 | //first byte is master command 0x04, second byte is master data 27 | void spi_byte_write_espslave(uint8 spi_no,uint8 data); 28 | //read data from esp8266 slave buffer,which needs 16bit transmission , 29 | //first byte is master command 0x06, second byte is to read slave data 30 | void spi_byte_read_espslave(uint8 spi_no,uint8 *data); 31 | 32 | //esp8266 slave mode initial 33 | void spi_slave_init(uint8 spi_no); 34 | //esp8266 slave isr handle funtion,tiggered when any transmission is finished. 35 | //the function is registered in spi_slave_init. 36 | void spi_slave_isr_handler(void *para); 37 | 38 | 39 | //hspi test function, used to test esp8266 spi slave 40 | void hspi_master_readwrite_repeat(void); 41 | 42 | 43 | void ICACHE_FLASH_ATTR 44 | spi_test_init(void); 45 | 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /app/driver/gpio16.c: -------------------------------------------------------------------------------- 1 | #include "ets_sys.h" 2 | #include "osapi.h" 3 | #include "driver/gpio16.h" 4 | 5 | void ICACHE_FLASH_ATTR 6 | gpio16_output_conf(void) 7 | { 8 | WRITE_PERI_REG(PAD_XPD_DCDC_CONF, 9 | (READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | (uint32)0x1); // mux configuration for XPD_DCDC to output rtc_gpio0 10 | 11 | WRITE_PERI_REG(RTC_GPIO_CONF, 12 | (READ_PERI_REG(RTC_GPIO_CONF) & (uint32)0xfffffffe) | (uint32)0x0); //mux configuration for out enable 13 | 14 | WRITE_PERI_REG(RTC_GPIO_ENABLE, 15 | (READ_PERI_REG(RTC_GPIO_ENABLE) & (uint32)0xfffffffe) | (uint32)0x1); //out enable 16 | } 17 | 18 | void ICACHE_FLASH_ATTR 19 | gpio16_output_set(uint8 value) 20 | { 21 | WRITE_PERI_REG(RTC_GPIO_OUT, 22 | (READ_PERI_REG(RTC_GPIO_OUT) & (uint32)0xfffffffe) | (uint32)(value & 1)); 23 | } 24 | 25 | void ICACHE_FLASH_ATTR 26 | gpio16_input_conf(void) 27 | { 28 | WRITE_PERI_REG(PAD_XPD_DCDC_CONF, 29 | (READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | (uint32)0x1); // mux configuration for XPD_DCDC and rtc_gpio0 connection 30 | 31 | WRITE_PERI_REG(RTC_GPIO_CONF, 32 | (READ_PERI_REG(RTC_GPIO_CONF) & (uint32)0xfffffffe) | (uint32)0x0); //mux configuration for out enable 33 | 34 | WRITE_PERI_REG(RTC_GPIO_ENABLE, 35 | READ_PERI_REG(RTC_GPIO_ENABLE) & (uint32)0xfffffffe); //out disable 36 | } 37 | 38 | uint8 ICACHE_FLASH_ATTR 39 | gpio16_input_get(void) 40 | { 41 | return (uint8)(READ_PERI_REG(RTC_GPIO_IN_DATA) & 1); 42 | } 43 | -------------------------------------------------------------------------------- /include/mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * This file is part of Espressif IOT Software Development Kit. 5 | * Copyright (C) 2013 - 2016, Espressif Systems 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef __MEM_H__ 26 | #define __MEM_H__ 27 | 28 | //void *pvPortMalloc( size_t xWantedSize ); 29 | //void vPortFree( void *pv ); 30 | //void *pvPortZalloc(size_t size); 31 | 32 | #define os_malloc pvPortMalloc 33 | #define os_free vPortFree 34 | #define os_zalloc pvPortZalloc 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /app/driver/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libdriver.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | INCLUDES += -I ./ 42 | PDIR := ../$(PDIR) 43 | sinclude $(PDIR)Makefile 44 | 45 | -------------------------------------------------------------------------------- /app/user/user_main.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright 2013-2014 Espressif Systems 3 | * 4 | * FileName: user_main.c 5 | * 6 | * Description: entry file of user application 7 | * 8 | * Modification history: 9 | * 2014/1/1, v1.0 create this file. 10 | * 2014/4/20, v1.0.1 edited for LP sensor 11 | *******************************************************************************/ 12 | #include "ets_sys.h" 13 | #include "osapi.h" 14 | 15 | #include "user_interface.h" 16 | 17 | #include "user_devicefind.h" 18 | #include "user_webserver.h" 19 | 20 | #if ESP_PLATFORM 21 | #include "user_esp_platform.h" 22 | #endif 23 | 24 | #ifdef SERVER_SSL_ENABLE 25 | #include "ssl/cert.h" 26 | #include "ssl/private_key.h" 27 | #else 28 | #ifdef CLIENT_SSL_ENABLE 29 | unsigned char *default_certificate; 30 | unsigned int default_certificate_len = 0; 31 | unsigned char *default_private_key; 32 | unsigned int default_private_key_len = 0; 33 | #endif 34 | #endif 35 | 36 | #include "driver/sensor_lp.h" 37 | #include "driver/uart.h" 38 | 39 | 40 | /****************************************************************************** 41 | * FunctionName : user_init 42 | * Description : entry of user application, init user function here 43 | * Parameters : none 44 | * Returns : none 45 | *******************************************************************************/ 46 | void user_init(void) { 47 | //set the uart baudrate to 115200 48 | uart_div_modify(0, 80*1000000 / 115200); 49 | os_printf("SDK version:%s\n", system_get_sdk_version()); 50 | data_func(); 51 | } 52 | 53 | -------------------------------------------------------------------------------- /include/os_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * This file is part of Espressif IOT Software Development Kit. 5 | * Copyright (C) 2013 - 2016, Espressif Systems 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | 26 | #ifndef _OS_TYPES_H_ 27 | #define _OS_TYPES_H_ 28 | 29 | #include "ets_sys.h" 30 | 31 | #define os_signal_t ETSSignal 32 | #define os_param_t ETSParam 33 | #define os_event_t ETSEvent 34 | #define os_task_t ETSTask 35 | #define os_timer_t ETSTimer 36 | #define os_timer_func_t ETSTimerFunc 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /app/user/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libuser.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | INCLUDES += -I ./ 42 | INCLUDES += -I ../../include/ets 43 | PDIR := ../$(PDIR) 44 | sinclude $(PDIR)Makefile 45 | 46 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/gpio16.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/gpio16.o .output/eagle/debug/obj/gpio16.d : gpio16.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../include/driver/gpio16.h 20 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/uart.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/uart.o .output/eagle/debug/obj/uart.d : uart.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../include/driver/uart.h \ 20 | ../include/driver/uart_register.h 21 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/i2c_master.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/i2c_master.o .output/eagle/debug/obj/i2c_master.d : i2c_master.c ../../include/ets_sys.h \ 2 | ../../include/c_types.h ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/gpio.h \ 20 | ../include/driver/i2c_master.h 21 | -------------------------------------------------------------------------------- /scripts/setup_AP_information.py: -------------------------------------------------------------------------------- 1 | import httplib, urllib 2 | import json 3 | import time 4 | 5 | 6 | def config_device(ssid,password,token,softap_ip): 7 | httpClient = None 8 | config_json = \ 9 | { 10 | "Request":{ 11 | "Station":{ 12 | "Connect_Station":{ 13 | "ssid":ssid, 14 | "password":password, 15 | "token":token 16 | }}}} 17 | 18 | 19 | #params = urllib.urlencode(config_json) 20 | #print "test: params: ",params 21 | params = json.dumps(config_json) 22 | 23 | if True: 24 | try: 25 | headers = {"Content-type": "application/json", "Accept": "text/plain","Connection": "keep-alive","token":"1234567890123456789012345678901234567890"} 26 | httpClient = httplib.HTTPConnection(softap_ip) 27 | httpClient.request("POST", "/config?command=wifi", params, headers) 28 | #response = httpClient.getresponse() 29 | 30 | except Exception, e: 31 | print e 32 | finally: 33 | if httpClient: 34 | httpClient.close() 35 | 36 | 37 | 38 | if __name__ =="__main__": 39 | #params: 40 | #ssid: target router ssid 41 | #password: router password 42 | #toke : a random value used to register to the server , 40bytes, just use the default value in this case 43 | #softap_ip: ip of the device softap interface 44 | 45 | #steps: 46 | #1.connect to the softap of device 47 | #2.set the router params: ssid and password 48 | #3.run&done 49 | 50 | config_device(ssid="your_router_ssid", 51 | password="your_router_password", 52 | token="1234567890123456789012345678901234567890", 53 | softap_ip="192.168.4.1") 54 | 55 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/pwm.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/pwm.o .output/eagle/debug/obj/pwm.d : pwm.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/os_type.h \ 3 | ../../include/ets_sys.h ../../include/osapi.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 19 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 20 | ../include/user_config.h ../../include/user_interface.h \ 21 | ../../include/os_type.h ../../include/ip_addr.h ../../include/queue.h \ 22 | ../../include/spi_flash.h ../include/driver/pwm.h 23 | -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_json.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/user_json.o .output/eagle/debug/obj/user_json.d : user_json.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/os_type.h ../../include/ets_sys.h \ 20 | ../../include/mem.h ../include/user_json.h \ 21 | ../../include/json/jsonparse.h ../../include/c_types.h \ 22 | ../../include/json/json.h ../../include/json/jsontree.h 23 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/key.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/key.o .output/eagle/debug/obj/key.d : key.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/os_type.h \ 3 | ../../include/ets_sys.h ../../include/osapi.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 19 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 20 | ../include/user_config.h ../../include/mem.h ../../include/gpio.h \ 21 | ../../include/user_interface.h ../../include/os_type.h \ 22 | ../../include/ip_addr.h ../../include/queue.h ../../include/spi_flash.h \ 23 | ../include/driver/key.h 24 | -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_light.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/user_light.o .output/eagle/debug/obj/user_light.d : user_light.c ../../include/ets_sys.h \ 2 | ../../include/c_types.h ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/os_type.h ../../include/ets_sys.h \ 20 | ../../include/mem.h ../../include/user_interface.h \ 21 | ../../include/os_type.h ../../include/ip_addr.h ../../include/queue.h \ 22 | ../../include/spi_flash.h ../include/user_light.h \ 23 | ../include/driver/pwm.h 24 | -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_plug.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/user_plug.o .output/eagle/debug/obj/user_plug.d : user_plug.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/os_type.h ../../include/ets_sys.h \ 20 | ../../include/mem.h ../../include/user_interface.h \ 21 | ../../include/os_type.h ../../include/ip_addr.h ../../include/queue.h \ 22 | ../../include/spi_flash.h ../include/user_plug.h ../include/driver/key.h \ 23 | ../../include/gpio.h 24 | -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_sensor.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/user_sensor.o .output/eagle/debug/obj/user_sensor.d : user_sensor.c ../../include/ets_sys.h \ 2 | ../../include/c_types.h ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/os_type.h ../../include/ets_sys.h \ 20 | ../../include/user_interface.h ../../include/os_type.h \ 21 | ../../include/ip_addr.h ../../include/queue.h ../../include/spi_flash.h \ 22 | ../include/user_sensor.h ../include/user_config.h \ 23 | ../include/driver/key.h ../../include/gpio.h 24 | -------------------------------------------------------------------------------- /include/spi_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * This file is part of Espressif IOT Software Development Kit. 5 | * Copyright (C) 2013 - 2016, Espressif Systems 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef SPI_FLASH_H 26 | #define SPI_FLASH_H 27 | 28 | typedef enum { 29 | SPI_FLASH_RESULT_OK, 30 | SPI_FLASH_RESULT_ERR, 31 | SPI_FLASH_RESULT_TIMEOUT 32 | } SpiFlashOpResult; 33 | 34 | typedef struct{ 35 | uint32 deviceId; 36 | uint32 chip_size; // chip size in byte 37 | uint32 block_size; 38 | uint32 sector_size; 39 | uint32 page_size; 40 | uint32 status_mask; 41 | } SpiFlashChip; 42 | 43 | #define SPI_FLASH_SEC_SIZE 4096 44 | 45 | uint32 spi_flash_get_id(void); 46 | SpiFlashOpResult spi_flash_erase_sector(uint16 sec); 47 | SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size); 48 | SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/sensor_lp.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/sensor_lp.o .output/eagle/debug/obj/sensor_lp.d : sensor_lp.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/c_types.h \ 20 | ../../include/user_interface.h ../../include/os_type.h \ 21 | ../../include/ets_sys.h ../../include/ip_addr.h ../../include/queue.h \ 22 | ../../include/spi_flash.h ../include/user_devicefind.h \ 23 | ../include/user_webserver.h ../include/user_esp_platform.h \ 24 | ../include/driver/sensor_lp.h 25 | -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_esp_platform_timer.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/user_esp_platform_timer.o .output/eagle/debug/obj/user_esp_platform_timer.d : user_esp_platform_timer.c \ 2 | ../../include/ets_sys.h ../../include/c_types.h \ 3 | ../../include/eagle_soc.h ../../include/os_type.h \ 4 | ../../include/ets_sys.h ../../include/mem.h ../../include/osapi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 19 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 20 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 21 | ../include/user_config.h ../../include/user_interface.h \ 22 | ../../include/os_type.h ../../include/ip_addr.h ../../include/queue.h \ 23 | ../../include/spi_flash.h ../../include/espconn.h \ 24 | ../include/user_esp_platform.h 25 | -------------------------------------------------------------------------------- /app/driver/.output/eagle/debug/obj/spi.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/spi.o .output/eagle/debug/obj/spi.d : spi.c ../include/driver/spi.h ../include/driver/spi_register.h \ 2 | ../../include/ets_sys.h ../../include/c_types.h \ 3 | ../../include/eagle_soc.h ../../include/osapi.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 19 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 20 | ../include/user_config.h ../include/driver/uart.h \ 21 | ../include/driver/uart_register.h ../../include/os_type.h \ 22 | ../../include/ets_sys.h ../../include/gpio.h \ 23 | ../../include/user_interface.h ../../include/os_type.h \ 24 | ../../include/ip_addr.h ../../include/queue.h ../../include/spi_flash.h \ 25 | ../../include/mem.h 26 | -------------------------------------------------------------------------------- /app/user/.output/eagle/debug/obj/user_main.d: -------------------------------------------------------------------------------- 1 | .output/eagle/debug/obj/user_main.o .output/eagle/debug/obj/user_main.d : user_main.c ../../include/ets_sys.h ../../include/c_types.h \ 2 | ../../include/eagle_soc.h ../../include/osapi.h \ 3 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/string.h \ 4 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 5 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/newlib.h \ 6 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/config.h \ 7 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/ieeefp.h \ 8 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/features.h \ 9 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/xtensa/config/core-isa.h \ 10 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/reent.h \ 11 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/_ansi.h \ 12 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/_types.h \ 13 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_types.h \ 14 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/machine/_default_types.h \ 15 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/lock.h \ 16 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 17 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/cdefs.h \ 18 | /Volumes/ESPTools/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/include/sys/string.h \ 19 | ../include/user_config.h ../../include/user_interface.h \ 20 | ../../include/os_type.h ../../include/ets_sys.h ../../include/ip_addr.h \ 21 | ../../include/queue.h ../../include/spi_flash.h \ 22 | ../include/user_devicefind.h ../include/user_webserver.h \ 23 | ../include/user_esp_platform.h ../include/driver/sensor_lp.h \ 24 | ../include/driver/uart.h ../include/driver/uart_register.h 25 | -------------------------------------------------------------------------------- /app/include/ssl/private_key.h: -------------------------------------------------------------------------------- 1 | unsigned char default_private_key[] = { 2 | 0x30, 0x82, 0x01, 0x3a, 0x02, 0x01, 0x00, 0x02, 0x41, 0x00, 0xb9, 0x83, 3 | 0x30, 0xca, 0xfb, 0xec, 0x11, 0x9e, 0x94, 0xb7, 0x89, 0xf2, 0x84, 0x2c, 4 | 0xda, 0xe1, 0x9a, 0x53, 0x3a, 0x1b, 0x6e, 0xc9, 0x85, 0x81, 0xf9, 0xa3, 5 | 0x41, 0xdb, 0xe2, 0x82, 0x3b, 0xfa, 0x80, 0x22, 0x3b, 0x81, 0x6d, 0x25, 6 | 0x73, 0x7e, 0xf6, 0x49, 0xcc, 0x69, 0x3c, 0x6c, 0xd8, 0x05, 0xfb, 0x92, 7 | 0x02, 0xcf, 0x19, 0x2a, 0x10, 0x7d, 0x69, 0x7a, 0xd8, 0x9d, 0xd3, 0xcf, 8 | 0x6c, 0xef, 0x02, 0x03, 0x01, 0x00, 0x01, 0x02, 0x40, 0x1d, 0x13, 0x92, 9 | 0xf2, 0x3d, 0xca, 0x22, 0x78, 0xd8, 0x96, 0x6b, 0xe8, 0xb7, 0x0e, 0xd0, 10 | 0xbf, 0xcb, 0x90, 0x7f, 0xeb, 0x0c, 0xd2, 0x49, 0x3a, 0xb6, 0x06, 0x00, 11 | 0xac, 0x96, 0x34, 0x13, 0x72, 0x4b, 0x8c, 0xd2, 0xb9, 0x35, 0xf5, 0x64, 12 | 0x18, 0xb2, 0x47, 0x5b, 0x9f, 0xbb, 0xf2, 0x5b, 0x2f, 0x66, 0x78, 0x2d, 13 | 0x0a, 0x76, 0x44, 0xc5, 0x4f, 0xdb, 0x7d, 0x13, 0xcf, 0xa5, 0x08, 0xdc, 14 | 0x01, 0x02, 0x21, 0x00, 0xdf, 0x9a, 0x89, 0xd0, 0xef, 0x23, 0xcf, 0x12, 15 | 0xac, 0x8a, 0x63, 0x1a, 0x8c, 0xc0, 0x3f, 0xf4, 0x38, 0x52, 0x3c, 0x9f, 16 | 0x19, 0x0a, 0x37, 0xd2, 0xcb, 0x5d, 0xeb, 0xb6, 0x2a, 0x33, 0xb0, 0x91, 17 | 0x02, 0x21, 0x00, 0xd4, 0x63, 0xd9, 0x6a, 0x18, 0x5b, 0xe8, 0xa8, 0x57, 18 | 0x4d, 0xd1, 0x9a, 0xa8, 0xd7, 0xe1, 0x65, 0x75, 0xb3, 0xb9, 0x5c, 0x94, 19 | 0x14, 0xca, 0x98, 0x41, 0x47, 0x9c, 0x0a, 0x22, 0x38, 0x05, 0x7f, 0x02, 20 | 0x20, 0x6a, 0xce, 0xfd, 0xef, 0xe0, 0x9b, 0x61, 0x49, 0x91, 0x43, 0x95, 21 | 0x6d, 0x54, 0x38, 0x6d, 0x14, 0x32, 0x67, 0x0d, 0xf0, 0x0d, 0x5c, 0xf5, 22 | 0x27, 0x6a, 0xdf, 0x55, 0x3d, 0xb1, 0xd0, 0xf9, 0x11, 0x02, 0x21, 0x00, 23 | 0xba, 0x94, 0xa0, 0xf9, 0xb0, 0x3e, 0x85, 0x8b, 0xe5, 0x6e, 0x4a, 0x95, 24 | 0x88, 0x80, 0x65, 0xd5, 0x00, 0xea, 0x8b, 0x0b, 0x46, 0x57, 0x61, 0x87, 25 | 0x11, 0xc9, 0xfb, 0xcd, 0x77, 0x34, 0x29, 0xb7, 0x02, 0x20, 0x06, 0x8d, 26 | 0x41, 0x11, 0x47, 0x93, 0xcb, 0xad, 0xda, 0x5d, 0xe1, 0x9d, 0x49, 0x8d, 27 | 0xe0, 0xab, 0x48, 0xe6, 0x18, 0x28, 0x4a, 0x94, 0xae, 0xf9, 0xad, 0xc5, 28 | 0x5b, 0x0b, 0x15, 0xc6, 0x73, 0x17 29 | }; 30 | unsigned int default_private_key_len = 318; 31 | -------------------------------------------------------------------------------- /app/include/driver/i2c_master.h: -------------------------------------------------------------------------------- 1 | #ifndef __I2C_MASTER_H__ 2 | #define __I2C_MASTER_H__ 3 | 4 | #define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO2_U 5 | #define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_MTMS_U 6 | #define I2C_MASTER_SDA_GPIO 2 7 | #define I2C_MASTER_SCL_GPIO 14 8 | #define I2C_MASTER_SDA_FUNC FUNC_GPIO2 9 | #define I2C_MASTER_SCL_FUNC FUNC_GPIO14 10 | 11 | //#define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO2_U 12 | //#define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_GPIO0_U 13 | //#define I2C_MASTER_SDA_GPIO 2 14 | //#define I2C_MASTER_SCL_GPIO 0 15 | //#define I2C_MASTER_SDA_FUNC FUNC_GPIO2 16 | //#define I2C_MASTER_SCL_FUNC FUNC_GPIO0 17 | 18 | #if 0 19 | #define I2C_MASTER_GPIO_SET(pin) \ 20 | gpio_output_set(1< 37 | * Joakim Eriksson 38 | */ 39 | 40 | #ifndef __JSON_H__ 41 | #define __JSON_H__ 42 | 43 | #define JSON_TYPE_ARRAY '[' 44 | #define JSON_TYPE_OBJECT '{' 45 | #define JSON_TYPE_PAIR ':' 46 | #define JSON_TYPE_PAIR_NAME 'N' /* for N:V pairs */ 47 | #define JSON_TYPE_STRING '"' 48 | #define JSON_TYPE_INT 'I' 49 | #define JSON_TYPE_NUMBER '0' 50 | #define JSON_TYPE_ERROR 0 51 | 52 | /* how should we handle null vs false - both can be 0? */ 53 | #define JSON_TYPE_NULL 'n' 54 | #define JSON_TYPE_TRUE 't' 55 | #define JSON_TYPE_FALSE 'f' 56 | 57 | #define JSON_TYPE_CALLBACK 'C' 58 | 59 | enum { 60 | JSON_ERROR_OK, 61 | JSON_ERROR_SYNTAX, 62 | JSON_ERROR_UNEXPECTED_ARRAY, 63 | JSON_ERROR_UNEXPECTED_END_OF_ARRAY, 64 | JSON_ERROR_UNEXPECTED_OBJECT, 65 | JSON_ERROR_UNEXPECTED_STRING 66 | }; 67 | 68 | #define JSON_CONTENT_TYPE "application/json" 69 | 70 | #endif /* __JSON_H__ */ 71 | -------------------------------------------------------------------------------- /app/driver/sensor_lp.c: -------------------------------------------------------------------------------- 1 | #include "ets_sys.h" 2 | #include "osapi.h" 3 | #include "c_types.h" 4 | #include "user_interface.h" 5 | #include "user_devicefind.h" 6 | #include "user_webserver.h" 7 | #include "user_esp_platform.h" 8 | #include "driver/sensor_lp.h" 9 | 10 | SENSOR_DATA_RTC_MEM sensor_data ; 11 | SENSOR_DATA_RTC_MEM* ICACHE_FLASH_ATTR get_sensor_data() { return &sensor_data; } 12 | 13 | void ICACHE_FLASH_ATTR data_func() { 14 | // Read out the sensor data structure from RTC memory 15 | system_rtc_mem_read( SENSOR_DATA_MEM_ADDR, &sensor_data, sizeof(SENSOR_DATA_RTC_MEM) ); 16 | 17 | // When the system powers on for the first time, the data in the rtc memory is random. 18 | struct esp_platform_saved_param esp_param_t; 19 | user_esp_platform_load_param(&esp_param_t); // Stored in flash 20 | // Load user params to check if the device was successfully registered to the server 21 | // If it wasn't, it usually returns 255 (from the flash.) 22 | 23 | if(sensor_data.init_flg!=INIT_MAGIC || sensor_data.cnt>SENSOR_DATA_NUM ) { 24 | // This case runs when we first power on or when it time to flush the RTC memory of old data. 25 | if(esp_param_t.activeflag!=1) { // If registered & activated 26 | user_esp_platform_init(); // Router is not configured. Setup softAP. Wait for config. 27 | #ifdef SERVER_SSL_ENABLE 28 | user_webserver_init(SERVER_SSL_PORT); 29 | #else 30 | user_webserver_init(SERVER_PORT); 31 | #endif 32 | } else { // was connected! So we set init magic to exit the setup loop 33 | sensor_data.init_flg = INIT_MAGIC; 34 | sensor_data.cnt = 0; 35 | system_rtc_mem_write(SENSOR_DATA_MEM_ADDR, &sensor_data, sizeof(SENSOR_DATA_RTC_MEM)); 36 | __SET__DEEP_SLEEP__WAKEUP_NO_RF__; 37 | system_deep_sleep(100000); 38 | } 39 | } else { // This is where the measurements are made 40 | uint16 vdd_val = 0; 41 | if(sensor_data.cnt<0 || sensor_data.cnt>=SENSOR_DATA_NUM) 42 | sensor_data.cnt=0; // range check and resets counter if needed 43 | 44 | /* Reads power supply voltage, byte 107 of init_data.bin should be set to 0xFF. 45 | * Replace with your own code.*/ 46 | sensor_data.data[sensor_data.cnt++] = (uint16)(phy_get_vdd33()); 47 | system_rtc_mem_write( SENSOR_DATA_MEM_ADDR, &sensor_data, sizeof(SENSOR_DATA_RTC_MEM) ); 48 | 49 | // Setup next sleep cycle 50 | if(sensor_data.cnt==SENSOR_DATA_NUM-1) { __SET__DEEP_SLEEP__WAKEUP_NORMAL__; } 51 | else { __SET__DEEP_SLEEP__WAKEUP_NO_RF__; } 52 | 53 | // Uploads or go to sleep 54 | if(sensor_data.cnt == SENSOR_DATA_NUM) { user_esp_platform_init(); } 55 | else { system_deep_sleep(SENSOR_DEEP_SLEEP_TIME); } 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /include/osapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * This file is part of Espressif IOT Software Development Kit. 5 | * Copyright (C) 2013 - 2016, Espressif Systems 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef _OSAPI_H_ 26 | #define _OSAPI_H_ 27 | 28 | #include 29 | #include "user_config.h" 30 | 31 | #define os_bzero ets_bzero 32 | #define os_delay_us ets_delay_us 33 | #define os_install_putc1 ets_install_putc1 34 | #define os_install_putc2 ets_install_putc2 35 | #define os_intr_lock ets_intr_lock 36 | #define os_intr_unlock ets_intr_unlock 37 | #define os_isr_attach ets_isr_attach 38 | #define os_isr_mask ets_isr_mask 39 | #define os_isr_unmask ets_isr_unmask 40 | #define os_memcmp ets_memcmp 41 | #define os_memcpy ets_memcpy 42 | #define os_memmove ets_memmove 43 | #define os_memset ets_memset 44 | #define os_putc ets_putc 45 | #define os_str2macaddr ets_str2macaddr 46 | #define os_strcat strcat 47 | #define os_strchr strchr 48 | #define os_strcmp ets_strcmp 49 | #define os_strcpy ets_strcpy 50 | #define os_strlen ets_strlen 51 | #define os_strncmp ets_strncmp 52 | #define os_strncpy ets_strncpy 53 | #define os_strstr ets_strstr 54 | #ifdef USE_US_TIMER 55 | #define os_timer_arm_us(a, b, c) ets_timer_arm_new(a, b, c, 0) 56 | #endif 57 | #define os_timer_arm(a, b, c) ets_timer_arm_new(a, b, c, 1) 58 | #define os_timer_disarm ets_timer_disarm 59 | #define os_timer_done ets_timer_done 60 | #define os_timer_handler_isr ets_timer_handler_isr 61 | #define os_timer_init ets_timer_init 62 | #define os_timer_setfn ets_timer_setfn 63 | 64 | #define os_sprintf ets_sprintf 65 | #define os_update_cpu_frequency ets_update_cpu_frequency 66 | 67 | #ifdef USE_OPTIMIZE_PRINTF 68 | #define os_printf(fmt, ...) do { \ 69 | static const char flash_str[] ICACHE_RODATA_ATTR = fmt; \ 70 | os_printf_plus(flash_str, ##__VA_ARGS__); \ 71 | } while(0) 72 | #else 73 | #define os_printf os_printf_plus 74 | #endif 75 | 76 | #endif 77 | 78 | -------------------------------------------------------------------------------- /app/gen_misc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | echo Please follow below steps(1-5) to generate specific bin(s): 4 | echo STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none) 5 | set input=default 6 | set /p input=enter(0/1/2, default 2): 7 | 8 | if %input% equ 0 ( 9 | set boot=old 10 | ) else ( 11 | if %input% equ 1 ( 12 | set boot=new 13 | ) else ( 14 | set boot=none 15 | ) 16 | ) 17 | 18 | echo boot mode: %boot% 19 | echo. 20 | 21 | echo STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin) 22 | set input=default 23 | set /p input=enter (0/1/2, default 0): 24 | 25 | if %input% equ 1 ( 26 | if %boot% equ none ( 27 | set app=0 28 | echo choose no boot before 29 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 30 | ) else ( 31 | set app=1 32 | echo generate bin: user1.bin 33 | ) 34 | ) else ( 35 | if %input% equ 2 ( 36 | if %boot% equ none ( 37 | set app=0 38 | echo choose no boot before 39 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 40 | ) else ( 41 | set app=2 42 | echo generate bin: user2.bin 43 | ) 44 | ) else ( 45 | if %boot% neq none ( 46 | set boot=none 47 | echo ignore boot 48 | ) 49 | set app=0 50 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 51 | )) 52 | 53 | echo. 54 | 55 | echo STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz) 56 | set input=default 57 | set /p input=enter (0/1/2/3, default 2): 58 | 59 | if %input% equ 0 ( 60 | set spi_speed=20 61 | ) else ( 62 | if %input% equ 1 ( 63 | set spi_speed=26.7 64 | ) else ( 65 | if %input% equ 3 ( 66 | set spi_speed=80 67 | ) else ( 68 | set spi_speed=40 69 | ))) 70 | 71 | echo spi speed: %spi_speed% MHz 72 | echo. 73 | 74 | echo STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT) 75 | set input=default 76 | set /p input=enter (0/1/2/3, default 0): 77 | 78 | if %input% equ 1 ( 79 | set spi_mode=QOUT 80 | ) else ( 81 | if %input% equ 2 ( 82 | set spi_mode=DIO 83 | ) else ( 84 | if %input% equ 3 ( 85 | set spi_mode=DOUT 86 | ) else ( 87 | set spi_mode=QIO 88 | ))) 89 | 90 | echo spi mode: %spi_mode% 91 | echo. 92 | 93 | echo STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB) 94 | set input=default 95 | set /p input=enter (0/1/2/3/4, default 1): 96 | 97 | if %input% equ 0 ( 98 | set spi_size=256 99 | ) else ( 100 | if %input% equ 2 ( 101 | set spi_size=1024 102 | ) else ( 103 | if %input% equ 3 ( 104 | set spi_size=2048 105 | ) else ( 106 | if %input% equ 4 ( 107 | set spi_size=4096 108 | ) else ( 109 | set spi_size=512 110 | )))) 111 | 112 | echo spi size: %spi_size% KB 113 | 114 | touch user/user_main.c 115 | 116 | echo. 117 | echo start... 118 | echo. 119 | 120 | make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size% 121 | 122 | -------------------------------------------------------------------------------- /scripts/get_sensor_voltage.py: -------------------------------------------------------------------------------- 1 | 2 | import datetime 3 | import time 4 | import os 5 | import binascii 6 | import string 7 | import httplib 8 | import urllib2 9 | import json 10 | 11 | DATETIME_FORMAT = '%Y%m%d-%H-%M-%S' 12 | now = datetime.datetime.now() 13 | dir_datetime = now.strftime(DATETIME_FORMAT) 14 | 15 | 16 | def get_test_data(devCnt=10,key='4f5bbb332f838b33cd6211a11bde561f06858c78',start='',end='',offset=0,data_stream="supply_voltage",data_num_in_set=20): 17 | devices_count =devCnt 18 | devKey = key 19 | start_time = start 20 | end_time = end 21 | offset = offset 22 | data_stream = data_stream 23 | 24 | host = 'iot.espressif.cn' 25 | headers = {'Host': host, 'User-Agent': 'Mozilla', 'Accept': '*/*', 'Authorization': 'token %s' % devKey} 26 | params=None 27 | if start_time=='': 28 | path = '/v1/datastreams/%s/datapoints/?row_count=%d' % (data_stream, devices_count ) 29 | elif offset == 0: 30 | path = '/v1/datastreams/%s/datapoints/?row_count=%d&start=%s&end=%s' % (data_stream, devices_count, start_time, end_time) 31 | else: 32 | path = '/v1/datastreams/%s/datapoints/?row_count=%d&start=%s&end=%s&offset=%d' % (data_stream, devices_count, start_time, end_time, offset) 33 | conn = httplib.HTTPConnection(host, port=80) 34 | conn.request("GET", path, params, headers) 35 | response = conn.getresponse() 36 | data = response.read() 37 | conn.close() 38 | 39 | total_data_dict = json.loads(data) 40 | time_list=[] 41 | idx_list = [] 42 | val_data_list = [] 43 | 44 | for dict_tmp in total_data_dict["datapoints"]: 45 | time_list.append( dict_tmp["updated"] ) 46 | idx_list.append( dict_tmp['x']) 47 | val_data_list.append( dict_tmp['y']) 48 | time_cal_list = [ str(datetime.datetime.strptime(time_list[i],'%Y-%m-%d %H:%M:%S') - datetime.timedelta(minutes=((data_num_in_set-1)-idx_list[i]))) for i in range(len(val_data_list))] 49 | voltage_list = [ i*1.0/1024 for i in val_data_list] 50 | time_cal_list.reverse() 51 | voltage_list.reverse() 52 | print time_cal_list 53 | print voltage_list 54 | 55 | 56 | 57 | 58 | if __name__ == '__main__': 59 | #devCnt : data num (<1000) 60 | #key: sensor devkey 61 | #start: data start time 62 | #end : data end time 63 | #offset: data page offset , (if data num exceed 1000: offset++) 64 | #data_stream : data_stream name on the server 65 | #key = '4f5bbb332f838b33cd6211a11bde561f06858c78' #device 66 | #key = '976f39a53c354de37e58f527c232c92b8f67ad12' #owner 67 | #key = 'e50d9d278b6953ff761db08ec37d3de09cb81577' #madcowmoomoo 68 | key = open('../bin/key.bin','r').readline().replace('\xFF','') 69 | print key 70 | get_test_data(devCnt=100, 71 | key=key, 72 | start='2015-03-15 00:00:00', 73 | end=dir_datetime, 74 | offset=1, 75 | data_num_in_set = 20, #data number uploaded one time 76 | data_stream="supply-voltage") 77 | 78 | 79 | -------------------------------------------------------------------------------- /include/at_custom.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * custom_at.h 4 | * 5 | * This file is part of Espressif's AT+ command set program. 6 | * Copyright (C) 2013 - 2016, Espressif Systems 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | #ifndef CUSTOM_AT_H_ 27 | #define CUSTOM_AT_H_ 28 | 29 | #include "c_types.h" 30 | 31 | typedef struct 32 | { 33 | char *at_cmdName; 34 | int8_t at_cmdLen; 35 | void (*at_testCmd)(uint8_t id); 36 | void (*at_queryCmd)(uint8_t id); 37 | void (*at_setupCmd)(uint8_t id, char *pPara); 38 | void (*at_exeCmd)(uint8_t id); 39 | }at_funcationType; 40 | 41 | /** 42 | * @brief Response "OK" to uart. 43 | * @param None 44 | * @retval None 45 | */ 46 | void at_response_ok(void); 47 | /** 48 | * @brief Response "ERROR" to uart. 49 | * @param events: no used 50 | * @retval None 51 | */ 52 | void at_response_error(void); 53 | /** 54 | * @brief Task of process command or txdata. 55 | * @param custom_at_cmd_array: the array of at cmd that custom defined 56 | * cmd_num : the num of at cmd that custom defined 57 | * @retval None 58 | */ 59 | void at_cmd_array_regist(at_funcationType *custom_at_cmd_array,uint32 cmd_num); 60 | /** 61 | * @brief get digit form at cmd line.the maybe alter pSrc 62 | * @param p_src: at cmd line string 63 | * result:the buffer to be placed result 64 | * err : err num 65 | * @retval TRUE: 66 | * FALSE: 67 | */ 68 | bool at_get_next_int_dec(char **p_src,int*result,int* err); 69 | /** 70 | * @brief get string form at cmd line.the maybe alter pSrc 71 | * @param p_dest: the buffer to be placed result 72 | * p_src: at cmd line string 73 | * max_len :max len of string excepted to get 74 | * @retval None 75 | */ 76 | int32 at_data_str_copy(char *p_dest, char **p_src, int32 max_len); 77 | 78 | /** 79 | * @brief initialize at module 80 | * @param None 81 | * @retval None 82 | */ 83 | void at_init(void); 84 | /** 85 | * @brief print string to at port 86 | * @param string 87 | * @retval None 88 | */ 89 | void at_port_print(const char *str); 90 | #endif 91 | -------------------------------------------------------------------------------- /app/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################# 2 | # Required variables for each makefile 3 | # Discard this section from all parent makefiles 4 | # Expected variables (with automatic defaults): 5 | # CSRCS (all "C" files in the dir) 6 | # SUBDIRS (all subdirs with a Makefile) 7 | # GEN_LIBS - list of libs to be generated () 8 | # GEN_IMAGES - list of object file images to be generated () 9 | # GEN_BINS - list of binaries to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | TARGET = eagle 15 | #FLAVOR = release 16 | FLAVOR = debug 17 | 18 | #EXTRA_CCFLAGS += -u 19 | 20 | ifndef PDIR # { 21 | GEN_IMAGES= eagle.app.v6.out 22 | GEN_BINS= eagle.app.v6.bin 23 | SPECIAL_MKTARGETS=$(APP_MKTARGETS) 24 | SUBDIRS= \ 25 | user \ 26 | driver 27 | 28 | endif # } PDIR 29 | 30 | APPDIR = . 31 | LDDIR = ../ld 32 | 33 | CCFLAGS += -Os 34 | 35 | TARGET_LDFLAGS = \ 36 | -nostdlib \ 37 | -Wl,-EL \ 38 | --longcalls \ 39 | --text-section-literals 40 | 41 | ifeq ($(FLAVOR),debug) 42 | TARGET_LDFLAGS += -g -O2 43 | endif 44 | 45 | ifeq ($(FLAVOR),release) 46 | TARGET_LDFLAGS += -g -O0 47 | endif 48 | 49 | COMPONENTS_eagle.app.v6 = \ 50 | user/libuser.a \ 51 | driver/libdriver.a 52 | 53 | LINKFLAGS_eagle.app.v6 = \ 54 | -L../lib \ 55 | -nostdlib \ 56 | -T$(LD_FILE) \ 57 | -Wl,--no-check-sections \ 58 | -u call_user_start \ 59 | -Wl,-static \ 60 | -Wl,--start-group \ 61 | -lc \ 62 | -lgcc \ 63 | -lhal \ 64 | -lphy \ 65 | -lpp \ 66 | -lnet80211 \ 67 | -llwip \ 68 | -lwpa \ 69 | -lmain \ 70 | -ljson \ 71 | -lupgrade\ 72 | -lssl \ 73 | $(DEP_LIBS_eagle.app.v6) \ 74 | -Wl,--end-group 75 | 76 | DEPENDS_eagle.app.v6 = \ 77 | $(LD_FILE) \ 78 | $(LDDIR)/eagle.rom.addr.v6.ld 79 | 80 | ############################################################# 81 | # Configuration i.e. compile options etc. 82 | # Target specific stuff (defines etc.) goes in here! 83 | # Generally values applying to a tree are captured in the 84 | # makefile at its root level - these are then overridden 85 | # for a subtree within the makefile rooted therein 86 | # 87 | 88 | #UNIVERSAL_TARGET_DEFINES = \ 89 | 90 | # Other potential configuration flags include: 91 | # -DTXRX_TXBUF_DEBUG 92 | # -DTXRX_RXBUF_DEBUG 93 | # -DWLAN_CONFIG_CCX 94 | CONFIGURATION_DEFINES = -DICACHE_FLASH 95 | 96 | DEFINES += \ 97 | $(UNIVERSAL_TARGET_DEFINES) \ 98 | $(CONFIGURATION_DEFINES) 99 | 100 | DDEFINES += \ 101 | $(UNIVERSAL_TARGET_DEFINES) \ 102 | $(CONFIGURATION_DEFINES) 103 | 104 | 105 | ############################################################# 106 | # Recursion Magic - Don't touch this!! 107 | # 108 | # Each subtree potentially has an include directory 109 | # corresponding to the common APIs applicable to modules 110 | # rooted at that subtree. Accordingly, the INCLUDE PATH 111 | # of a module can only contain the include directories up 112 | # its parent path, and not its siblings 113 | # 114 | # Required for each makefile to inherit from the parent 115 | # 116 | 117 | INCLUDES := $(INCLUDES) -I $(PDIR)include 118 | PDIR := ../$(PDIR) 119 | sinclude $(PDIR)Makefile 120 | 121 | .PHONY: FORCE 122 | FORCE: 123 | 124 | -------------------------------------------------------------------------------- /include/ip_addr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * This file is part of Espressif IOT Software Development Kit. 5 | * Copyright (C) 2013 - 2016, Espressif Systems 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | #ifndef __IP_ADDR_H__ 26 | #define __IP_ADDR_H__ 27 | 28 | #include "c_types.h" 29 | 30 | struct ip_addr { 31 | uint32 addr; 32 | }; 33 | 34 | typedef struct ip_addr ip_addr_t; 35 | 36 | struct ip_info { 37 | struct ip_addr ip; 38 | struct ip_addr netmask; 39 | struct ip_addr gw; 40 | }; 41 | 42 | #define IP4_ADDR(ipaddr, a,b,c,d) \ 43 | (ipaddr)->addr = ((uint32)((d) & 0xff) << 24) | \ 44 | ((uint32)((c) & 0xff) << 16) | \ 45 | ((uint32)((b) & 0xff) << 8) | \ 46 | (uint32)((a) & 0xff) 47 | 48 | /** 49 | * Determine if two address are on the same network. 50 | * 51 | * @arg addr1 IP address 1 52 | * @arg addr2 IP address 2 53 | * @arg mask network identifier mask 54 | * @return !0 if the network identifiers of both address match 55 | */ 56 | #define ip_addr_netcmp(addr1, addr2, mask) (((addr1)->addr & \ 57 | (mask)->addr) == \ 58 | ((addr2)->addr & \ 59 | (mask)->addr)) 60 | 61 | /** Set an IP address given by the four byte-parts. 62 | Little-endian version that prevents the use of htonl. */ 63 | #define IP4_ADDR(ipaddr, a,b,c,d) \ 64 | (ipaddr)->addr = ((uint32)((d) & 0xff) << 24) | \ 65 | ((uint32)((c) & 0xff) << 16) | \ 66 | ((uint32)((b) & 0xff) << 8) | \ 67 | (uint32)((a) & 0xff) 68 | 69 | #define ip4_addr1(ipaddr) (((uint8*)(ipaddr))[0]) 70 | #define ip4_addr2(ipaddr) (((uint8*)(ipaddr))[1]) 71 | #define ip4_addr3(ipaddr) (((uint8*)(ipaddr))[2]) 72 | #define ip4_addr4(ipaddr) (((uint8*)(ipaddr))[3]) 73 | 74 | #define ip4_addr1_16(ipaddr) ((uint16)ip4_addr1(ipaddr)) 75 | #define ip4_addr2_16(ipaddr) ((uint16)ip4_addr2(ipaddr)) 76 | #define ip4_addr3_16(ipaddr) ((uint16)ip4_addr3(ipaddr)) 77 | #define ip4_addr4_16(ipaddr) ((uint16)ip4_addr4(ipaddr)) 78 | 79 | 80 | /** 255.255.255.255 */ 81 | #define IPADDR_NONE ((uint32)0xffffffffUL) 82 | /** 0.0.0.0 */ 83 | #define IPADDR_ANY ((uint32)0x00000000UL) 84 | uint32 ipaddr_addr(const char *cp); 85 | 86 | #define IP2STR(ipaddr) ip4_addr1_16(ipaddr), \ 87 | ip4_addr2_16(ipaddr), \ 88 | ip4_addr3_16(ipaddr), \ 89 | ip4_addr4_16(ipaddr) 90 | 91 | #define IPSTR "%d.%d.%d.%d" 92 | 93 | #endif /* __IP_ADDR_H__ */ 94 | -------------------------------------------------------------------------------- /include/gpio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | */ 5 | 6 | #ifndef _GPIO_H_ 7 | #define _GPIO_H_ 8 | 9 | #define GPIO_PIN_ADDR(i) (GPIO_PIN0_ADDRESS + i*4) 10 | 11 | #define GPIO_ID_IS_PIN_REGISTER(reg_id) \ 12 | ((reg_id >= GPIO_ID_PIN0) && (reg_id <= GPIO_ID_PIN(GPIO_PIN_COUNT-1))) 13 | 14 | #define GPIO_REGID_TO_PINIDX(reg_id) ((reg_id) - GPIO_ID_PIN0) 15 | 16 | typedef enum { 17 | GPIO_PIN_INTR_DISABLE = 0, 18 | GPIO_PIN_INTR_POSEDGE = 1, 19 | GPIO_PIN_INTR_NEGEDGE = 2, 20 | GPIO_PIN_INTR_ANYEDGE = 3, 21 | GPIO_PIN_INTR_LOLEVEL = 4, 22 | GPIO_PIN_INTR_HILEVEL = 5 23 | } GPIO_INT_TYPE; 24 | 25 | #define GPIO_OUTPUT_SET(gpio_no, bit_value) \ 26 | gpio_output_set(bit_value<>gpio_no)&BIT0) 29 | 30 | /* GPIO interrupt handler, registered through gpio_intr_handler_register */ 31 | typedef void (* gpio_intr_handler_fn_t)(uint32 intr_mask, void *arg); 32 | 33 | 34 | /* 35 | * Initialize GPIO. This includes reading the GPIO Configuration DataSet 36 | * to initialize "output enables" and pin configurations for each gpio pin. 37 | * Must be called once during startup. 38 | */ 39 | void gpio_init(void); 40 | 41 | /* 42 | * Change GPIO pin output by setting, clearing, or disabling pins. 43 | * In general, it is expected that a bit will be set in at most one 44 | * of these masks. If a bit is clear in all masks, the output state 45 | * remains unchanged. 46 | * 47 | * There is no particular ordering guaranteed; so if the order of 48 | * writes is significant, calling code should divide a single call 49 | * into multiple calls. 50 | */ 51 | void gpio_output_set(uint32 set_mask, 52 | uint32 clear_mask, 53 | uint32 enable_mask, 54 | uint32 disable_mask); 55 | 56 | /* 57 | * Sample the value of GPIO input pins and returns a bitmask. 58 | */ 59 | uint32 gpio_input_get(void); 60 | 61 | /* 62 | * Set the specified GPIO register to the specified value. 63 | * This is a very general and powerful interface that is not 64 | * expected to be used during normal operation. It is intended 65 | * mainly for debug, or for unusual requirements. 66 | */ 67 | void gpio_register_set(uint32 reg_id, uint32 value); 68 | 69 | /* Get the current value of the specified GPIO register. */ 70 | uint32 gpio_register_get(uint32 reg_id); 71 | 72 | /* 73 | * Register an application-specific interrupt handler for GPIO pin 74 | * interrupts. Once the interrupt handler is called, it will not 75 | * be called again until after a call to gpio_intr_ack. Any GPIO 76 | * interrupts that occur during the interim are masked. 77 | * 78 | * The application-specific handler is called with a mask of 79 | * pending GPIO interrupts. After processing pin interrupts, the 80 | * application-specific handler may wish to use gpio_intr_pending 81 | * to check for any additional pending interrupts before it returns. 82 | */ 83 | void gpio_intr_handler_register(gpio_intr_handler_fn_t fn, void *arg); 84 | 85 | /* Determine which GPIO interrupts are pending. */ 86 | uint32 gpio_intr_pending(void); 87 | 88 | /* 89 | * Acknowledge GPIO interrupts. 90 | * Intended to be called from the gpio_intr_handler_fn. 91 | */ 92 | void gpio_intr_ack(uint32 ack_mask); 93 | 94 | void gpio_pin_wakeup_enable(uint32 i, GPIO_INT_TYPE intr_state); 95 | 96 | void gpio_pin_wakeup_disable(); 97 | 98 | void gpio_pin_intr_state_set(uint32 i, GPIO_INT_TYPE intr_state); 99 | 100 | #endif // _GPIO_H_ 101 | -------------------------------------------------------------------------------- /scripts/plot_sensor_voltage.py: -------------------------------------------------------------------------------- 1 | 2 | import datetime 3 | import time 4 | import os 5 | import binascii 6 | import string 7 | import httplib 8 | import urllib2 9 | import json 10 | import matplotlib.pyplot as plt 11 | import numpy as np 12 | 13 | DATETIME_FORMAT = '%Y%m%d-%H-%M-%S' 14 | now = datetime.datetime.now() 15 | dir_datetime = now.strftime(DATETIME_FORMAT) 16 | 17 | 18 | def get_test_data(key='26484cd14129a0c64ed1bf9608fec6cabb0fd0c9',start='',end='',offset=0, datastream='supply-voltage'): 19 | voltage_list = [] 20 | time_cal_list = [] 21 | end_tmp = end 22 | while True: 23 | [t,v] = get_test_data_sub(devCnt=1000,key=key,start=start,end=end_tmp,offset=offset,datastream=datastream) 24 | time_cal_list.extend(t) 25 | voltage_list.extend(v) 26 | if len(t)==0: break 27 | if not time_cal_list[-1]>datetime.datetime.strptime(start, '%Y-%m-%d %H:%M:%S'): break 28 | end_tmp = t[-1] 29 | 30 | #for i in range(len(voltage_list)-1): 31 | # if voltage_list[i]remote_ip, &ipconfig.ip, &ipconfig.netmask)) { 49 | wifi_get_ip_info(STATION_IF, &ipconfig); 50 | wifi_get_macaddr(STATION_IF, hwaddr); 51 | } 52 | } else { 53 | wifi_get_ip_info(STATION_IF, &ipconfig); 54 | wifi_get_macaddr(STATION_IF, hwaddr); 55 | } 56 | 57 | if (pusrdata == NULL) { 58 | return; 59 | } 60 | 61 | if (length == os_strlen(device_find_request) && 62 | os_strncmp(pusrdata, device_find_request, os_strlen(device_find_request)) == 0) { 63 | os_sprintf(DeviceBuffer, "%s" MACSTR " " IPSTR, device_find_response_ok, 64 | MAC2STR(hwaddr), IP2STR(&ipconfig.ip)); 65 | 66 | os_printf("%s\n", DeviceBuffer); 67 | length = os_strlen(DeviceBuffer); 68 | espconn_sent(&ptrespconn, DeviceBuffer, length); 69 | } else if (length == (os_strlen(device_find_request) + 18)) { 70 | os_sprintf(Device_mac_buffer, "%s " MACSTR , device_find_request, MAC2STR(hwaddr)); 71 | os_printf("%s", Device_mac_buffer); 72 | 73 | if (os_strncmp(Device_mac_buffer, pusrdata, os_strlen(device_find_request) + 18) == 0) { 74 | //os_printf("%s\n", Device_mac_buffer); 75 | length = os_strlen(DeviceBuffer); 76 | os_sprintf(DeviceBuffer, "%s" MACSTR " " IPSTR, device_find_response_ok, 77 | MAC2STR(hwaddr), IP2STR(&ipconfig.ip)); 78 | 79 | os_printf("%s\n", DeviceBuffer); 80 | length = os_strlen(DeviceBuffer); 81 | espconn_sent(&ptrespconn, DeviceBuffer, length); 82 | } else { 83 | return; 84 | } 85 | } 86 | } 87 | 88 | /****************************************************************************** 89 | * FunctionName : user_devicefind_init 90 | * Description : the espconn struct parame init 91 | * Parameters : none 92 | * Returns : none 93 | *******************************************************************************/ 94 | void ICACHE_FLASH_ATTR 95 | user_devicefind_init(void) { 96 | ptrespconn.type = ESPCONN_UDP; 97 | ptrespconn.proto.udp = (esp_udp *)os_zalloc(sizeof(esp_udp)); 98 | ptrespconn.proto.udp->local_port = 1025; 99 | espconn_regist_recvcb(&ptrespconn, user_devicefind_recv); 100 | espconn_create(&ptrespconn); 101 | } 102 | -------------------------------------------------------------------------------- /app/gen_misc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # File : gen_misc.sh 4 | # This file is part of Espressif's generate bin script. 5 | # Copyright (C) 2013 - 2015, Espressif Systems 6 | 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | 14 | # The above copyright notice and this permission notice shall be included in all 15 | # copies or substantial portions of the Software. 16 | 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | # SOFTWARE. 24 | 25 | echo "Please follow below steps(1-5) to generate specific bin(s):" 26 | echo "STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)" 27 | echo "enter(0/1/2, default 2):" 28 | read input 29 | 30 | if [ -z "$input" ]; then 31 | boot=none 32 | elif [ $input == 0 ]; then 33 | boot=old 34 | elif [ $input == 1 ]; then 35 | boot=new 36 | else 37 | boot=none 38 | fi 39 | 40 | echo "boot mode: $boot" 41 | echo "" 42 | 43 | echo "STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)" 44 | echo "enter (0/1/2, default 0):" 45 | read input 46 | 47 | if [ -z "$input" ]; then 48 | if [ $boot != none ]; then 49 | boot=none 50 | echo "ignore boot" 51 | fi 52 | app=0 53 | echo "generate bin: eagle.flash.bin+eagle.irom0text.bin" 54 | elif [ $input == 1 ]; then 55 | if [ $boot == none ]; then 56 | app=0 57 | echo "choose no boot before" 58 | echo "generate bin: eagle.flash.bin+eagle.irom0text.bin" 59 | else 60 | app=1 61 | echo "generate bin: user1.bin" 62 | fi 63 | elif [ $input == 2 ]; then 64 | if [ $boot == none ]; then 65 | app=0 66 | echo "choose no boot before" 67 | echo "generate bin: eagle.flash.bin+eagle.irom0text.bin" 68 | else 69 | app=2 70 | echo "generate bin: user2.bin" 71 | fi 72 | else 73 | if [ $boot != none ]; then 74 | boot=none 75 | echo "ignore boot" 76 | fi 77 | app=0 78 | echo "generate bin: eagle.flash.bin+eagle.irom0text.bin" 79 | fi 80 | 81 | echo "" 82 | 83 | echo "STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)" 84 | echo "enter (0/1/2/3, default 2):" 85 | read input 86 | 87 | if [ -z "$input" ]; then 88 | spi_speed=40 89 | elif [ $input == 0 ]; then 90 | spi_speed=20 91 | elif [ $input == 1 ]; then 92 | spi_speed=26.7 93 | elif [ $input == 3 ]; then 94 | spi_speed=80 95 | else 96 | spi_speed=40 97 | fi 98 | 99 | echo "spi speed: $spi_speed MHz" 100 | echo "" 101 | 102 | echo "STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)" 103 | echo "enter (0/1/2/3, default 0):" 104 | read input 105 | 106 | if [ -z "$input" ]; then 107 | spi_mode=QIO 108 | elif [ $input == 1 ]; then 109 | spi_mode=QOUT 110 | elif [ $input == 2 ]; then 111 | spi_mode=DIO 112 | elif [ $input == 3 ]; then 113 | spi_mode=DOUT 114 | else 115 | spi_mode=QIO 116 | fi 117 | 118 | echo "spi mode: $spi_mode" 119 | echo "" 120 | 121 | echo "STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB)" 122 | echo "enter (0/1/2/3/4, default 1):" 123 | read input 124 | 125 | if [ -z "$input" ]; then 126 | spi_size=512 127 | elif [ $input == 0 ]; then 128 | spi_size=256 129 | elif [ $input == 2 ]; then 130 | spi_size=1024 131 | elif [ $input == 3 ]; then 132 | spi_size=2048 133 | elif [ $input == 4 ]; then 134 | spi_size=4096 135 | else 136 | spi_size=512 137 | fi 138 | 139 | echo "spi size: $spi_size KB" 140 | echo "" 141 | 142 | touch user/user_main.c 143 | 144 | echo "" 145 | echo "start..." 146 | echo "" 147 | 148 | make COMPILE=gcc BOOT=$boot APP=$app SPI_SPEED=$spi_speed SPI_MODE=$spi_mode SPI_SIZE=$spi_size 149 | -------------------------------------------------------------------------------- /app/user/user_sensor.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright 2013-2014 Espressif Systems 3 | * 4 | * FileName: user_sensor.c 5 | * 6 | * Description: sensor demo's function realization 7 | * 8 | * Modification history: 9 | * 2014/5/1, v1.0 create this file. 10 | *******************************************************************************/ 11 | #include "ets_sys.h" 12 | #include "osapi.h" 13 | #include "os_type.h" 14 | #include "user_interface.h" 15 | 16 | #include "user_config.h" 17 | 18 | #if SENSOR_DEVICE 19 | #include "user_sensor.h" 20 | 21 | LOCAL struct keys_param keys; 22 | LOCAL struct single_key_param *single_key[SENSOR_KEY_NUM]; 23 | LOCAL os_timer_t sensor_sleep_timer; 24 | LOCAL os_timer_t link_led_timer; 25 | LOCAL uint8 link_led_level = 0; 26 | LOCAL uint32 link_start_time; 27 | 28 | 29 | /****************************************************************************** 30 | * FunctionName : user_sensor_long_press 31 | * Description : sensor key's function, needed to be installed 32 | * Parameters : none 33 | * Returns : none 34 | *******************************************************************************/ 35 | LOCAL void ICACHE_FLASH_ATTR user_sensor_long_press(void) { 36 | user_esp_platform_set_active(0); 37 | system_restore(); 38 | system_restart(); 39 | } 40 | 41 | LOCAL void ICACHE_FLASH_ATTR user_link_led_init(void) { 42 | PIN_FUNC_SELECT(SENSOR_LINK_LED_IO_MUX, SENSOR_LINK_LED_IO_FUNC); 43 | PIN_FUNC_SELECT(SENSOR_UNUSED_LED_IO_MUX, SENSOR_UNUSED_LED_IO_FUNC); 44 | GPIO_OUTPUT_SET(GPIO_ID_PIN(SENSOR_UNUSED_LED_IO_NUM), 0); 45 | } 46 | 47 | void ICACHE_FLASH_ATTR user_link_led_output(uint8 level) { 48 | GPIO_OUTPUT_SET(GPIO_ID_PIN(SENSOR_LINK_LED_IO_NUM), level); 49 | } 50 | 51 | LOCAL void ICACHE_FLASH_ATTR user_link_led_timer_cb(void) { 52 | link_led_level = (~link_led_level) & 0x01; 53 | GPIO_OUTPUT_SET(GPIO_ID_PIN(SENSOR_LINK_LED_IO_NUM), link_led_level); 54 | } 55 | 56 | void ICACHE_FLASH_ATTR user_link_led_timer_init(void) { 57 | link_start_time = system_get_time(); 58 | os_timer_disarm(&link_led_timer); 59 | os_timer_setfn(&link_led_timer, (os_timer_func_t *)user_link_led_timer_cb, NULL); 60 | os_timer_arm(&link_led_timer, 50, 1); 61 | link_led_level = 0; 62 | GPIO_OUTPUT_SET(GPIO_ID_PIN(SENSOR_LINK_LED_IO_NUM), link_led_level); 63 | } 64 | 65 | void ICACHE_FLASH_ATTR user_link_led_timer_done(void) { 66 | os_timer_disarm(&link_led_timer); 67 | GPIO_OUTPUT_SET(GPIO_ID_PIN(SENSOR_LINK_LED_IO_NUM), 0); 68 | } 69 | 70 | void ICACHE_FLASH_ATTR user_sensor_deep_sleep_enter(void) { 71 | system_deep_sleep(SENSOR_DEEP_SLEEP_TIME > link_start_time \ 72 | ? SENSOR_DEEP_SLEEP_TIME - link_start_time : 30000000); 73 | } 74 | 75 | void ICACHE_FLASH_ATTR user_sensor_deep_sleep_disable(void) { 76 | os_timer_disarm(&sensor_sleep_timer); 77 | } 78 | 79 | void ICACHE_FLASH_ATTR user_sensor_deep_sleep_init(uint32 time) { 80 | os_timer_disarm(&sensor_sleep_timer); 81 | os_timer_setfn(&sensor_sleep_timer, (os_timer_func_t *)user_sensor_deep_sleep_enter, NULL); 82 | os_timer_arm(&sensor_sleep_timer, time, 0); 83 | } 84 | 85 | /****************************************************************************** 86 | * FunctionName : user_sensor_init 87 | * Description : init sensor function, include key and mvh3004 88 | * Parameters : none 89 | * Returns : none 90 | *******************************************************************************/ 91 | void ICACHE_FLASH_ATTR user_sensor_init(uint8 active) { 92 | user_link_led_init(); 93 | wifi_status_led_install(SENSOR_WIFI_LED_IO_NUM, SENSOR_WIFI_LED_IO_MUX, SENSOR_WIFI_LED_IO_FUNC); 94 | 95 | if (wifi_get_opmode() != SOFTAP_MODE) { 96 | single_key[0] = key_init_single(SENSOR_KEY_IO_NUM, SENSOR_KEY_IO_MUX, SENSOR_KEY_IO_FUNC, 97 | user_sensor_long_press, NULL); 98 | 99 | keys.key_num = SENSOR_KEY_NUM; 100 | keys.single_key = single_key; 101 | key_init(&keys); 102 | 103 | if (GPIO_INPUT_GET(GPIO_ID_PIN(SENSOR_KEY_IO_NUM)) == 0) { 104 | user_sensor_long_press(); 105 | } 106 | } 107 | 108 | if (wifi_get_opmode() != STATIONAP_MODE) { 109 | if (active == 1) { 110 | user_sensor_deep_sleep_init(SENSOR_CONNECT_TIME / 1000);//exceed SENSOR_CONNECT_TIME,sleep directly 111 | } else { 112 | user_sensor_deep_sleep_init(SENSOR_CONNECT_TIME / 1000);//exceed SENSOR_CONNECT_TIME,sleep directly 113 | } 114 | } 115 | } 116 | #endif 117 | 118 | -------------------------------------------------------------------------------- /app/include/driver/uart_register.h: -------------------------------------------------------------------------------- 1 | //Generated at 2012-07-03 18:44:06 2 | /* 3 | * Copyright (c) 2010 - 2011 Espressif System 4 | * 5 | */ 6 | 7 | #ifndef UART_REGISTER_H_INCLUDED 8 | #define UART_REGISTER_H_INCLUDED 9 | #define REG_UART_BASE( i ) (0x60000000+(i)*0xf00) 10 | //version value:32'h062000 11 | 12 | #define UART_FIFO( i ) (REG_UART_BASE( i ) + 0x0) 13 | #define UART_RXFIFO_RD_BYTE 0x000000FF 14 | #define UART_RXFIFO_RD_BYTE_S 0 15 | 16 | #define UART_INT_RAW( i ) (REG_UART_BASE( i ) + 0x4) 17 | #define UART_RXFIFO_TOUT_INT_RAW (BIT(8)) 18 | #define UART_BRK_DET_INT_RAW (BIT(7)) 19 | #define UART_CTS_CHG_INT_RAW (BIT(6)) 20 | #define UART_DSR_CHG_INT_RAW (BIT(5)) 21 | #define UART_RXFIFO_OVF_INT_RAW (BIT(4)) 22 | #define UART_FRM_ERR_INT_RAW (BIT(3)) 23 | #define UART_PARITY_ERR_INT_RAW (BIT(2)) 24 | #define UART_TXFIFO_EMPTY_INT_RAW (BIT(1)) 25 | #define UART_RXFIFO_FULL_INT_RAW (BIT(0)) 26 | 27 | #define UART_INT_ST( i ) (REG_UART_BASE( i ) + 0x8) 28 | #define UART_RXFIFO_TOUT_INT_ST (BIT(8)) 29 | #define UART_BRK_DET_INT_ST (BIT(7)) 30 | #define UART_CTS_CHG_INT_ST (BIT(6)) 31 | #define UART_DSR_CHG_INT_ST (BIT(5)) 32 | #define UART_RXFIFO_OVF_INT_ST (BIT(4)) 33 | #define UART_FRM_ERR_INT_ST (BIT(3)) 34 | #define UART_PARITY_ERR_INT_ST (BIT(2)) 35 | #define UART_TXFIFO_EMPTY_INT_ST (BIT(1)) 36 | #define UART_RXFIFO_FULL_INT_ST (BIT(0)) 37 | 38 | #define UART_INT_ENA( i ) (REG_UART_BASE( i ) + 0xC) 39 | #define UART_RXFIFO_TOUT_INT_ENA (BIT(8)) 40 | #define UART_BRK_DET_INT_ENA (BIT(7)) 41 | #define UART_CTS_CHG_INT_ENA (BIT(6)) 42 | #define UART_DSR_CHG_INT_ENA (BIT(5)) 43 | #define UART_RXFIFO_OVF_INT_ENA (BIT(4)) 44 | #define UART_FRM_ERR_INT_ENA (BIT(3)) 45 | #define UART_PARITY_ERR_INT_ENA (BIT(2)) 46 | #define UART_TXFIFO_EMPTY_INT_ENA (BIT(1)) 47 | #define UART_RXFIFO_FULL_INT_ENA (BIT(0)) 48 | 49 | #define UART_INT_CLR( i ) (REG_UART_BASE( i ) + 0x10) 50 | #define UART_RXFIFO_TOUT_INT_CLR (BIT(8)) 51 | #define UART_BRK_DET_INT_CLR (BIT(7)) 52 | #define UART_CTS_CHG_INT_CLR (BIT(6)) 53 | #define UART_DSR_CHG_INT_CLR (BIT(5)) 54 | #define UART_RXFIFO_OVF_INT_CLR (BIT(4)) 55 | #define UART_FRM_ERR_INT_CLR (BIT(3)) 56 | #define UART_PARITY_ERR_INT_CLR (BIT(2)) 57 | #define UART_TXFIFO_EMPTY_INT_CLR (BIT(1)) 58 | #define UART_RXFIFO_FULL_INT_CLR (BIT(0)) 59 | 60 | #define UART_CLKDIV( i ) (REG_UART_BASE( i ) + 0x14) 61 | #define UART_CLKDIV_CNT 0x000FFFFF 62 | #define UART_CLKDIV_S 0 63 | 64 | #define UART_AUTOBAUD( i ) (REG_UART_BASE( i ) + 0x18) 65 | #define UART_GLITCH_FILT 0x000000FF 66 | #define UART_GLITCH_FILT_S 8 67 | #define UART_AUTOBAUD_EN (BIT(0)) 68 | 69 | #define UART_STATUS( i ) (REG_UART_BASE( i ) + 0x1C) 70 | #define UART_TXD (BIT(31)) 71 | #define UART_RTSN (BIT(30)) 72 | #define UART_DTRN (BIT(29)) 73 | #define UART_TXFIFO_CNT 0x000000FF 74 | #define UART_TXFIFO_CNT_S 16 75 | #define UART_RXD (BIT(15)) 76 | #define UART_CTSN (BIT(14)) 77 | #define UART_DSRN (BIT(13)) 78 | #define UART_RXFIFO_CNT 0x000000FF 79 | #define UART_RXFIFO_CNT_S 0 80 | 81 | #define UART_CONF0( i ) (REG_UART_BASE( i ) + 0x20) 82 | #define UART_TXFIFO_RST (BIT(18)) 83 | #define UART_RXFIFO_RST (BIT(17)) 84 | #define UART_IRDA_EN (BIT(16)) 85 | #define UART_TX_FLOW_EN (BIT(15)) 86 | #define UART_LOOPBACK (BIT(14)) 87 | #define UART_IRDA_RX_INV (BIT(13)) 88 | #define UART_IRDA_TX_INV (BIT(12)) 89 | #define UART_IRDA_WCTL (BIT(11)) 90 | #define UART_IRDA_TX_EN (BIT(10)) 91 | #define UART_IRDA_DPLX (BIT(9)) 92 | #define UART_TXD_BRK (BIT(8)) 93 | #define UART_SW_DTR (BIT(7)) 94 | #define UART_SW_RTS (BIT(6)) 95 | #define UART_STOP_BIT_NUM 0x00000003 96 | #define UART_STOP_BIT_NUM_S 4 97 | #define UART_BIT_NUM 0x00000003 98 | #define UART_BIT_NUM_S 2 99 | #define UART_PARITY_EN (BIT(1)) 100 | #define UART_PARITY (BIT(0)) 101 | 102 | #define UART_CONF1( i ) (REG_UART_BASE( i ) + 0x24) 103 | #define UART_RX_TOUT_EN (BIT(31)) 104 | #define UART_RX_TOUT_THRHD 0x0000007F 105 | #define UART_RX_TOUT_THRHD_S 24 106 | #define UART_RX_FLOW_EN (BIT(23)) 107 | #define UART_RX_FLOW_THRHD 0x0000007F 108 | #define UART_RX_FLOW_THRHD_S 16 109 | #define UART_TXFIFO_EMPTY_THRHD 0x0000007F 110 | #define UART_TXFIFO_EMPTY_THRHD_S 8 111 | #define UART_RXFIFO_FULL_THRHD 0x0000007F 112 | #define UART_RXFIFO_FULL_THRHD_S 0 113 | 114 | #define UART_LOWPULSE( i ) (REG_UART_BASE( i ) + 0x28) 115 | #define UART_LOWPULSE_MIN_CNT 0x000FFFFF 116 | #define UART_LOWPULSE_MIN_CNT_S 0 117 | 118 | #define UART_HIGHPULSE( i ) (REG_UART_BASE( i ) + 0x2C) 119 | #define UART_HIGHPULSE_MIN_CNT 0x000FFFFF 120 | #define UART_HIGHPULSE_MIN_CNT_S 0 121 | 122 | #define UART_PULSE_NUM( i ) (REG_UART_BASE( i ) + 0x30) 123 | #define UART_PULSE_NUM_CNT 0x0003FF 124 | #define UART_PULSE_NUM_CNT_S 0 125 | 126 | #define UART_DATE( i ) (REG_UART_BASE( i ) + 0x78) 127 | #define UART_ID( i ) (REG_UART_BASE( i ) + 0x7C) 128 | #endif // UART_REGISTER_H_INCLUDED 129 | -------------------------------------------------------------------------------- /ld/eagle.app.v6.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40240000, len = 0x32000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 24 | /* Various memory-map dependent cache attribute settings: */ 25 | _memmap_cacheattr_wb_base = 0x00000110; 26 | _memmap_cacheattr_wt_base = 0x00000110; 27 | _memmap_cacheattr_bp_base = 0x00000220; 28 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 29 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 30 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 31 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 32 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 33 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 34 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 35 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 36 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 37 | _memmap_cacheattr_wb_allvalid = 0x22222112; 38 | _memmap_cacheattr_wt_allvalid = 0x22222112; 39 | _memmap_cacheattr_bp_allvalid = 0x22222222; 40 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 41 | 42 | SECTIONS 43 | { 44 | 45 | .dport0.rodata : ALIGN(4) 46 | { 47 | _dport0_rodata_start = ABSOLUTE(.); 48 | *(.dport0.rodata) 49 | *(.dport.rodata) 50 | _dport0_rodata_end = ABSOLUTE(.); 51 | } >dport0_0_seg :dport0_0_phdr 52 | 53 | .dport0.literal : ALIGN(4) 54 | { 55 | _dport0_literal_start = ABSOLUTE(.); 56 | *(.dport0.literal) 57 | *(.dport.literal) 58 | _dport0_literal_end = ABSOLUTE(.); 59 | } >dport0_0_seg :dport0_0_phdr 60 | 61 | .dport0.data : ALIGN(4) 62 | { 63 | _dport0_data_start = ABSOLUTE(.); 64 | *(.dport0.data) 65 | *(.dport.data) 66 | _dport0_data_end = ABSOLUTE(.); 67 | } >dport0_0_seg :dport0_0_phdr 68 | 69 | .data : ALIGN(4) 70 | { 71 | _data_start = ABSOLUTE(.); 72 | *(.data) 73 | *(.data.*) 74 | *(.gnu.linkonce.d.*) 75 | *(.data1) 76 | *(.sdata) 77 | *(.sdata.*) 78 | *(.gnu.linkonce.s.*) 79 | *(.sdata2) 80 | *(.sdata2.*) 81 | *(.gnu.linkonce.s2.*) 82 | *(.jcr) 83 | _data_end = ABSOLUTE(.); 84 | } >dram0_0_seg :dram0_0_phdr 85 | 86 | .rodata : ALIGN(4) 87 | { 88 | _rodata_start = ABSOLUTE(.); 89 | *(.rodata) 90 | *(.rodata.*) 91 | *(.gnu.linkonce.r.*) 92 | *(.rodata1) 93 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 94 | *(.xt_except_table) 95 | *(.gcc_except_table) 96 | *(.gnu.linkonce.e.*) 97 | *(.gnu.version_r) 98 | *(.eh_frame) 99 | /* C++ constructor and destructor tables, properly ordered: */ 100 | KEEP (*crtbegin.o(.ctors)) 101 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 102 | KEEP (*(SORT(.ctors.*))) 103 | KEEP (*(.ctors)) 104 | KEEP (*crtbegin.o(.dtors)) 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 106 | KEEP (*(SORT(.dtors.*))) 107 | KEEP (*(.dtors)) 108 | /* C++ exception handlers table: */ 109 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 110 | *(.xt_except_desc) 111 | *(.gnu.linkonce.h.*) 112 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 113 | *(.xt_except_desc_end) 114 | *(.dynamic) 115 | *(.gnu.version_d) 116 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 117 | _bss_table_start = ABSOLUTE(.); 118 | LONG(_bss_start) 119 | LONG(_bss_end) 120 | _bss_table_end = ABSOLUTE(.); 121 | _rodata_end = ABSOLUTE(.); 122 | } >dram0_0_seg :dram0_0_phdr 123 | 124 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 125 | { 126 | . = ALIGN (8); 127 | _bss_start = ABSOLUTE(.); 128 | *(.dynsbss) 129 | *(.sbss) 130 | *(.sbss.*) 131 | *(.gnu.linkonce.sb.*) 132 | *(.scommon) 133 | *(.sbss2) 134 | *(.sbss2.*) 135 | *(.gnu.linkonce.sb2.*) 136 | *(.dynbss) 137 | *(.bss) 138 | *(.bss.*) 139 | *(.gnu.linkonce.b.*) 140 | *(COMMON) 141 | . = ALIGN (8); 142 | _bss_end = ABSOLUTE(.); 143 | _heap_start = ABSOLUTE(.); 144 | /* _stack_sentry = ALIGN(0x8); */ 145 | } >dram0_0_seg :dram0_0_bss_phdr 146 | /* __stack = 0x3ffc8000; */ 147 | 148 | .text : ALIGN(4) 149 | { 150 | _stext = .; 151 | _text_start = ABSOLUTE(.); 152 | *(.entry.text) 153 | *(.init.literal) 154 | *(.init) 155 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 156 | *(.fini.literal) 157 | *(.fini) 158 | *(.gnu.version) 159 | _text_end = ABSOLUTE(.); 160 | _etext = .; 161 | } >iram1_0_seg :iram1_0_phdr 162 | 163 | .lit4 : ALIGN(4) 164 | { 165 | _lit4_start = ABSOLUTE(.); 166 | *(*.lit4) 167 | *(.lit4.*) 168 | *(.gnu.linkonce.lit4.*) 169 | _lit4_end = ABSOLUTE(.); 170 | } >iram1_0_seg :iram1_0_phdr 171 | 172 | .irom0.text : ALIGN(4) 173 | { 174 | _irom0_text_start = ABSOLUTE(.); 175 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 176 | _irom0_text_end = ABSOLUTE(.); 177 | } >irom0_0_seg :irom0_0_phdr 178 | } 179 | 180 | /* get ROM code address */ 181 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 182 | -------------------------------------------------------------------------------- /ld/eagle.app.v6.new.1024.app1.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40201010, len = 0x6B000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 24 | /* Various memory-map dependent cache attribute settings: */ 25 | _memmap_cacheattr_wb_base = 0x00000110; 26 | _memmap_cacheattr_wt_base = 0x00000110; 27 | _memmap_cacheattr_bp_base = 0x00000220; 28 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 29 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 30 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 31 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 32 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 33 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 34 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 35 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 36 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 37 | _memmap_cacheattr_wb_allvalid = 0x22222112; 38 | _memmap_cacheattr_wt_allvalid = 0x22222112; 39 | _memmap_cacheattr_bp_allvalid = 0x22222222; 40 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 41 | 42 | SECTIONS 43 | { 44 | 45 | .dport0.rodata : ALIGN(4) 46 | { 47 | _dport0_rodata_start = ABSOLUTE(.); 48 | *(.dport0.rodata) 49 | *(.dport.rodata) 50 | _dport0_rodata_end = ABSOLUTE(.); 51 | } >dport0_0_seg :dport0_0_phdr 52 | 53 | .dport0.literal : ALIGN(4) 54 | { 55 | _dport0_literal_start = ABSOLUTE(.); 56 | *(.dport0.literal) 57 | *(.dport.literal) 58 | _dport0_literal_end = ABSOLUTE(.); 59 | } >dport0_0_seg :dport0_0_phdr 60 | 61 | .dport0.data : ALIGN(4) 62 | { 63 | _dport0_data_start = ABSOLUTE(.); 64 | *(.dport0.data) 65 | *(.dport.data) 66 | _dport0_data_end = ABSOLUTE(.); 67 | } >dport0_0_seg :dport0_0_phdr 68 | 69 | .data : ALIGN(4) 70 | { 71 | _data_start = ABSOLUTE(.); 72 | *(.data) 73 | *(.data.*) 74 | *(.gnu.linkonce.d.*) 75 | *(.data1) 76 | *(.sdata) 77 | *(.sdata.*) 78 | *(.gnu.linkonce.s.*) 79 | *(.sdata2) 80 | *(.sdata2.*) 81 | *(.gnu.linkonce.s2.*) 82 | *(.jcr) 83 | _data_end = ABSOLUTE(.); 84 | } >dram0_0_seg :dram0_0_phdr 85 | 86 | .rodata : ALIGN(4) 87 | { 88 | _rodata_start = ABSOLUTE(.); 89 | *(.rodata) 90 | *(.rodata.*) 91 | *(.gnu.linkonce.r.*) 92 | *(.rodata1) 93 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 94 | *(.xt_except_table) 95 | *(.gcc_except_table) 96 | *(.gnu.linkonce.e.*) 97 | *(.gnu.version_r) 98 | *(.eh_frame) 99 | /* C++ constructor and destructor tables, properly ordered: */ 100 | KEEP (*crtbegin.o(.ctors)) 101 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 102 | KEEP (*(SORT(.ctors.*))) 103 | KEEP (*(.ctors)) 104 | KEEP (*crtbegin.o(.dtors)) 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 106 | KEEP (*(SORT(.dtors.*))) 107 | KEEP (*(.dtors)) 108 | /* C++ exception handlers table: */ 109 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 110 | *(.xt_except_desc) 111 | *(.gnu.linkonce.h.*) 112 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 113 | *(.xt_except_desc_end) 114 | *(.dynamic) 115 | *(.gnu.version_d) 116 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 117 | _bss_table_start = ABSOLUTE(.); 118 | LONG(_bss_start) 119 | LONG(_bss_end) 120 | _bss_table_end = ABSOLUTE(.); 121 | _rodata_end = ABSOLUTE(.); 122 | } >dram0_0_seg :dram0_0_phdr 123 | 124 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 125 | { 126 | . = ALIGN (8); 127 | _bss_start = ABSOLUTE(.); 128 | *(.dynsbss) 129 | *(.sbss) 130 | *(.sbss.*) 131 | *(.gnu.linkonce.sb.*) 132 | *(.scommon) 133 | *(.sbss2) 134 | *(.sbss2.*) 135 | *(.gnu.linkonce.sb2.*) 136 | *(.dynbss) 137 | *(.bss) 138 | *(.bss.*) 139 | *(.gnu.linkonce.b.*) 140 | *(COMMON) 141 | . = ALIGN (8); 142 | _bss_end = ABSOLUTE(.); 143 | _heap_start = ABSOLUTE(.); 144 | /* _stack_sentry = ALIGN(0x8); */ 145 | } >dram0_0_seg :dram0_0_bss_phdr 146 | /* __stack = 0x3ffc8000; */ 147 | 148 | .text : ALIGN(4) 149 | { 150 | _stext = .; 151 | _text_start = ABSOLUTE(.); 152 | *(.entry.text) 153 | *(.init.literal) 154 | *(.init) 155 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 156 | *(.fini.literal) 157 | *(.fini) 158 | *(.gnu.version) 159 | _text_end = ABSOLUTE(.); 160 | _etext = .; 161 | } >iram1_0_seg :iram1_0_phdr 162 | 163 | .lit4 : ALIGN(4) 164 | { 165 | _lit4_start = ABSOLUTE(.); 166 | *(*.lit4) 167 | *(.lit4.*) 168 | *(.gnu.linkonce.lit4.*) 169 | _lit4_end = ABSOLUTE(.); 170 | } >iram1_0_seg :iram1_0_phdr 171 | 172 | .irom0.text : ALIGN(4) 173 | { 174 | _irom0_text_start = ABSOLUTE(.); 175 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 176 | _irom0_text_end = ABSOLUTE(.); 177 | } >irom0_0_seg :irom0_0_phdr 178 | } 179 | 180 | /* get ROM code address */ 181 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 182 | -------------------------------------------------------------------------------- /ld/eagle.app.v6.new.1024.app2.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40281010, len = 0x6B000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 24 | /* Various memory-map dependent cache attribute settings: */ 25 | _memmap_cacheattr_wb_base = 0x00000110; 26 | _memmap_cacheattr_wt_base = 0x00000110; 27 | _memmap_cacheattr_bp_base = 0x00000220; 28 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 29 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 30 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 31 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 32 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 33 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 34 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 35 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 36 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 37 | _memmap_cacheattr_wb_allvalid = 0x22222112; 38 | _memmap_cacheattr_wt_allvalid = 0x22222112; 39 | _memmap_cacheattr_bp_allvalid = 0x22222222; 40 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 41 | 42 | SECTIONS 43 | { 44 | 45 | .dport0.rodata : ALIGN(4) 46 | { 47 | _dport0_rodata_start = ABSOLUTE(.); 48 | *(.dport0.rodata) 49 | *(.dport.rodata) 50 | _dport0_rodata_end = ABSOLUTE(.); 51 | } >dport0_0_seg :dport0_0_phdr 52 | 53 | .dport0.literal : ALIGN(4) 54 | { 55 | _dport0_literal_start = ABSOLUTE(.); 56 | *(.dport0.literal) 57 | *(.dport.literal) 58 | _dport0_literal_end = ABSOLUTE(.); 59 | } >dport0_0_seg :dport0_0_phdr 60 | 61 | .dport0.data : ALIGN(4) 62 | { 63 | _dport0_data_start = ABSOLUTE(.); 64 | *(.dport0.data) 65 | *(.dport.data) 66 | _dport0_data_end = ABSOLUTE(.); 67 | } >dport0_0_seg :dport0_0_phdr 68 | 69 | .data : ALIGN(4) 70 | { 71 | _data_start = ABSOLUTE(.); 72 | *(.data) 73 | *(.data.*) 74 | *(.gnu.linkonce.d.*) 75 | *(.data1) 76 | *(.sdata) 77 | *(.sdata.*) 78 | *(.gnu.linkonce.s.*) 79 | *(.sdata2) 80 | *(.sdata2.*) 81 | *(.gnu.linkonce.s2.*) 82 | *(.jcr) 83 | _data_end = ABSOLUTE(.); 84 | } >dram0_0_seg :dram0_0_phdr 85 | 86 | .rodata : ALIGN(4) 87 | { 88 | _rodata_start = ABSOLUTE(.); 89 | *(.rodata) 90 | *(.rodata.*) 91 | *(.gnu.linkonce.r.*) 92 | *(.rodata1) 93 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 94 | *(.xt_except_table) 95 | *(.gcc_except_table) 96 | *(.gnu.linkonce.e.*) 97 | *(.gnu.version_r) 98 | *(.eh_frame) 99 | /* C++ constructor and destructor tables, properly ordered: */ 100 | KEEP (*crtbegin.o(.ctors)) 101 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 102 | KEEP (*(SORT(.ctors.*))) 103 | KEEP (*(.ctors)) 104 | KEEP (*crtbegin.o(.dtors)) 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 106 | KEEP (*(SORT(.dtors.*))) 107 | KEEP (*(.dtors)) 108 | /* C++ exception handlers table: */ 109 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 110 | *(.xt_except_desc) 111 | *(.gnu.linkonce.h.*) 112 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 113 | *(.xt_except_desc_end) 114 | *(.dynamic) 115 | *(.gnu.version_d) 116 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 117 | _bss_table_start = ABSOLUTE(.); 118 | LONG(_bss_start) 119 | LONG(_bss_end) 120 | _bss_table_end = ABSOLUTE(.); 121 | _rodata_end = ABSOLUTE(.); 122 | } >dram0_0_seg :dram0_0_phdr 123 | 124 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 125 | { 126 | . = ALIGN (8); 127 | _bss_start = ABSOLUTE(.); 128 | *(.dynsbss) 129 | *(.sbss) 130 | *(.sbss.*) 131 | *(.gnu.linkonce.sb.*) 132 | *(.scommon) 133 | *(.sbss2) 134 | *(.sbss2.*) 135 | *(.gnu.linkonce.sb2.*) 136 | *(.dynbss) 137 | *(.bss) 138 | *(.bss.*) 139 | *(.gnu.linkonce.b.*) 140 | *(COMMON) 141 | . = ALIGN (8); 142 | _bss_end = ABSOLUTE(.); 143 | _heap_start = ABSOLUTE(.); 144 | /* _stack_sentry = ALIGN(0x8); */ 145 | } >dram0_0_seg :dram0_0_bss_phdr 146 | /* __stack = 0x3ffc8000; */ 147 | 148 | .text : ALIGN(4) 149 | { 150 | _stext = .; 151 | _text_start = ABSOLUTE(.); 152 | *(.entry.text) 153 | *(.init.literal) 154 | *(.init) 155 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 156 | *(.fini.literal) 157 | *(.fini) 158 | *(.gnu.version) 159 | _text_end = ABSOLUTE(.); 160 | _etext = .; 161 | } >iram1_0_seg :iram1_0_phdr 162 | 163 | .lit4 : ALIGN(4) 164 | { 165 | _lit4_start = ABSOLUTE(.); 166 | *(*.lit4) 167 | *(.lit4.*) 168 | *(.gnu.linkonce.lit4.*) 169 | _lit4_end = ABSOLUTE(.); 170 | } >iram1_0_seg :iram1_0_phdr 171 | 172 | .irom0.text : ALIGN(4) 173 | { 174 | _irom0_text_start = ABSOLUTE(.); 175 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 176 | _irom0_text_end = ABSOLUTE(.); 177 | } >irom0_0_seg :irom0_0_phdr 178 | } 179 | 180 | /* get ROM code address */ 181 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 182 | -------------------------------------------------------------------------------- /ld/eagle.app.v6.new.512.app1.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40201010, len = 0x2B000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 24 | /* Various memory-map dependent cache attribute settings: */ 25 | _memmap_cacheattr_wb_base = 0x00000110; 26 | _memmap_cacheattr_wt_base = 0x00000110; 27 | _memmap_cacheattr_bp_base = 0x00000220; 28 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 29 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 30 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 31 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 32 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 33 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 34 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 35 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 36 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 37 | _memmap_cacheattr_wb_allvalid = 0x22222112; 38 | _memmap_cacheattr_wt_allvalid = 0x22222112; 39 | _memmap_cacheattr_bp_allvalid = 0x22222222; 40 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 41 | 42 | SECTIONS 43 | { 44 | 45 | .dport0.rodata : ALIGN(4) 46 | { 47 | _dport0_rodata_start = ABSOLUTE(.); 48 | *(.dport0.rodata) 49 | *(.dport.rodata) 50 | _dport0_rodata_end = ABSOLUTE(.); 51 | } >dport0_0_seg :dport0_0_phdr 52 | 53 | .dport0.literal : ALIGN(4) 54 | { 55 | _dport0_literal_start = ABSOLUTE(.); 56 | *(.dport0.literal) 57 | *(.dport.literal) 58 | _dport0_literal_end = ABSOLUTE(.); 59 | } >dport0_0_seg :dport0_0_phdr 60 | 61 | .dport0.data : ALIGN(4) 62 | { 63 | _dport0_data_start = ABSOLUTE(.); 64 | *(.dport0.data) 65 | *(.dport.data) 66 | _dport0_data_end = ABSOLUTE(.); 67 | } >dport0_0_seg :dport0_0_phdr 68 | 69 | .data : ALIGN(4) 70 | { 71 | _data_start = ABSOLUTE(.); 72 | *(.data) 73 | *(.data.*) 74 | *(.gnu.linkonce.d.*) 75 | *(.data1) 76 | *(.sdata) 77 | *(.sdata.*) 78 | *(.gnu.linkonce.s.*) 79 | *(.sdata2) 80 | *(.sdata2.*) 81 | *(.gnu.linkonce.s2.*) 82 | *(.jcr) 83 | _data_end = ABSOLUTE(.); 84 | } >dram0_0_seg :dram0_0_phdr 85 | 86 | .rodata : ALIGN(4) 87 | { 88 | _rodata_start = ABSOLUTE(.); 89 | *(.rodata) 90 | *(.rodata.*) 91 | *(.gnu.linkonce.r.*) 92 | *(.rodata1) 93 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 94 | *(.xt_except_table) 95 | *(.gcc_except_table) 96 | *(.gnu.linkonce.e.*) 97 | *(.gnu.version_r) 98 | *(.eh_frame) 99 | /* C++ constructor and destructor tables, properly ordered: */ 100 | KEEP (*crtbegin.o(.ctors)) 101 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 102 | KEEP (*(SORT(.ctors.*))) 103 | KEEP (*(.ctors)) 104 | KEEP (*crtbegin.o(.dtors)) 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 106 | KEEP (*(SORT(.dtors.*))) 107 | KEEP (*(.dtors)) 108 | /* C++ exception handlers table: */ 109 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 110 | *(.xt_except_desc) 111 | *(.gnu.linkonce.h.*) 112 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 113 | *(.xt_except_desc_end) 114 | *(.dynamic) 115 | *(.gnu.version_d) 116 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 117 | _bss_table_start = ABSOLUTE(.); 118 | LONG(_bss_start) 119 | LONG(_bss_end) 120 | _bss_table_end = ABSOLUTE(.); 121 | _rodata_end = ABSOLUTE(.); 122 | } >dram0_0_seg :dram0_0_phdr 123 | 124 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 125 | { 126 | . = ALIGN (8); 127 | _bss_start = ABSOLUTE(.); 128 | *(.dynsbss) 129 | *(.sbss) 130 | *(.sbss.*) 131 | *(.gnu.linkonce.sb.*) 132 | *(.scommon) 133 | *(.sbss2) 134 | *(.sbss2.*) 135 | *(.gnu.linkonce.sb2.*) 136 | *(.dynbss) 137 | *(.bss) 138 | *(.bss.*) 139 | *(.gnu.linkonce.b.*) 140 | *(COMMON) 141 | . = ALIGN (8); 142 | _bss_end = ABSOLUTE(.); 143 | _heap_start = ABSOLUTE(.); 144 | /* _stack_sentry = ALIGN(0x8); */ 145 | } >dram0_0_seg :dram0_0_bss_phdr 146 | /* __stack = 0x3ffc8000; */ 147 | 148 | .text : ALIGN(4) 149 | { 150 | _stext = .; 151 | _text_start = ABSOLUTE(.); 152 | *(.entry.text) 153 | *(.init.literal) 154 | *(.init) 155 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 156 | *(.fini.literal) 157 | *(.fini) 158 | *(.gnu.version) 159 | _text_end = ABSOLUTE(.); 160 | _etext = .; 161 | } >iram1_0_seg :iram1_0_phdr 162 | 163 | .lit4 : ALIGN(4) 164 | { 165 | _lit4_start = ABSOLUTE(.); 166 | *(*.lit4) 167 | *(.lit4.*) 168 | *(.gnu.linkonce.lit4.*) 169 | _lit4_end = ABSOLUTE(.); 170 | } >iram1_0_seg :iram1_0_phdr 171 | 172 | .irom0.text : ALIGN(4) 173 | { 174 | _irom0_text_start = ABSOLUTE(.); 175 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 176 | _irom0_text_end = ABSOLUTE(.); 177 | } >irom0_0_seg :irom0_0_phdr 178 | } 179 | 180 | /* get ROM code address */ 181 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 182 | -------------------------------------------------------------------------------- /ld/eagle.app.v6.new.512.app2.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40241010, len = 0x2B000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 24 | /* Various memory-map dependent cache attribute settings: */ 25 | _memmap_cacheattr_wb_base = 0x00000110; 26 | _memmap_cacheattr_wt_base = 0x00000110; 27 | _memmap_cacheattr_bp_base = 0x00000220; 28 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 29 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 30 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 31 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 32 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 33 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 34 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 35 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 36 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 37 | _memmap_cacheattr_wb_allvalid = 0x22222112; 38 | _memmap_cacheattr_wt_allvalid = 0x22222112; 39 | _memmap_cacheattr_bp_allvalid = 0x22222222; 40 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 41 | 42 | SECTIONS 43 | { 44 | 45 | .dport0.rodata : ALIGN(4) 46 | { 47 | _dport0_rodata_start = ABSOLUTE(.); 48 | *(.dport0.rodata) 49 | *(.dport.rodata) 50 | _dport0_rodata_end = ABSOLUTE(.); 51 | } >dport0_0_seg :dport0_0_phdr 52 | 53 | .dport0.literal : ALIGN(4) 54 | { 55 | _dport0_literal_start = ABSOLUTE(.); 56 | *(.dport0.literal) 57 | *(.dport.literal) 58 | _dport0_literal_end = ABSOLUTE(.); 59 | } >dport0_0_seg :dport0_0_phdr 60 | 61 | .dport0.data : ALIGN(4) 62 | { 63 | _dport0_data_start = ABSOLUTE(.); 64 | *(.dport0.data) 65 | *(.dport.data) 66 | _dport0_data_end = ABSOLUTE(.); 67 | } >dport0_0_seg :dport0_0_phdr 68 | 69 | .data : ALIGN(4) 70 | { 71 | _data_start = ABSOLUTE(.); 72 | *(.data) 73 | *(.data.*) 74 | *(.gnu.linkonce.d.*) 75 | *(.data1) 76 | *(.sdata) 77 | *(.sdata.*) 78 | *(.gnu.linkonce.s.*) 79 | *(.sdata2) 80 | *(.sdata2.*) 81 | *(.gnu.linkonce.s2.*) 82 | *(.jcr) 83 | _data_end = ABSOLUTE(.); 84 | } >dram0_0_seg :dram0_0_phdr 85 | 86 | .rodata : ALIGN(4) 87 | { 88 | _rodata_start = ABSOLUTE(.); 89 | *(.rodata) 90 | *(.rodata.*) 91 | *(.gnu.linkonce.r.*) 92 | *(.rodata1) 93 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 94 | *(.xt_except_table) 95 | *(.gcc_except_table) 96 | *(.gnu.linkonce.e.*) 97 | *(.gnu.version_r) 98 | *(.eh_frame) 99 | /* C++ constructor and destructor tables, properly ordered: */ 100 | KEEP (*crtbegin.o(.ctors)) 101 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 102 | KEEP (*(SORT(.ctors.*))) 103 | KEEP (*(.ctors)) 104 | KEEP (*crtbegin.o(.dtors)) 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 106 | KEEP (*(SORT(.dtors.*))) 107 | KEEP (*(.dtors)) 108 | /* C++ exception handlers table: */ 109 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 110 | *(.xt_except_desc) 111 | *(.gnu.linkonce.h.*) 112 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 113 | *(.xt_except_desc_end) 114 | *(.dynamic) 115 | *(.gnu.version_d) 116 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 117 | _bss_table_start = ABSOLUTE(.); 118 | LONG(_bss_start) 119 | LONG(_bss_end) 120 | _bss_table_end = ABSOLUTE(.); 121 | _rodata_end = ABSOLUTE(.); 122 | } >dram0_0_seg :dram0_0_phdr 123 | 124 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 125 | { 126 | . = ALIGN (8); 127 | _bss_start = ABSOLUTE(.); 128 | *(.dynsbss) 129 | *(.sbss) 130 | *(.sbss.*) 131 | *(.gnu.linkonce.sb.*) 132 | *(.scommon) 133 | *(.sbss2) 134 | *(.sbss2.*) 135 | *(.gnu.linkonce.sb2.*) 136 | *(.dynbss) 137 | *(.bss) 138 | *(.bss.*) 139 | *(.gnu.linkonce.b.*) 140 | *(COMMON) 141 | . = ALIGN (8); 142 | _bss_end = ABSOLUTE(.); 143 | _heap_start = ABSOLUTE(.); 144 | /* _stack_sentry = ALIGN(0x8); */ 145 | } >dram0_0_seg :dram0_0_bss_phdr 146 | /* __stack = 0x3ffc8000; */ 147 | 148 | .text : ALIGN(4) 149 | { 150 | _stext = .; 151 | _text_start = ABSOLUTE(.); 152 | *(.entry.text) 153 | *(.init.literal) 154 | *(.init) 155 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 156 | *(.fini.literal) 157 | *(.fini) 158 | *(.gnu.version) 159 | _text_end = ABSOLUTE(.); 160 | _etext = .; 161 | } >iram1_0_seg :iram1_0_phdr 162 | 163 | .lit4 : ALIGN(4) 164 | { 165 | _lit4_start = ABSOLUTE(.); 166 | *(*.lit4) 167 | *(.lit4.*) 168 | *(.gnu.linkonce.lit4.*) 169 | _lit4_end = ABSOLUTE(.); 170 | } >iram1_0_seg :iram1_0_phdr 171 | 172 | .irom0.text : ALIGN(4) 173 | { 174 | _irom0_text_start = ABSOLUTE(.); 175 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 176 | _irom0_text_end = ABSOLUTE(.); 177 | } >irom0_0_seg :irom0_0_phdr 178 | } 179 | 180 | /* get ROM code address */ 181 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 182 | -------------------------------------------------------------------------------- /ld/eagle.app.v6.old.1024.app1.ld: -------------------------------------------------------------------------------- 1 | /* This linker script generated from xt-genldscripts.tpp for LSP . */ 2 | /* Linker Script for ld -N */ 3 | MEMORY 4 | { 5 | dport0_0_seg : org = 0x3FF00000, len = 0x10 6 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 7 | iram1_0_seg : org = 0x40100000, len = 0x8000 8 | irom0_0_seg : org = 0x40211000, len = 0x6B000 9 | } 10 | 11 | PHDRS 12 | { 13 | dport0_0_phdr PT_LOAD; 14 | dram0_0_phdr PT_LOAD; 15 | dram0_0_bss_phdr PT_LOAD; 16 | iram1_0_phdr PT_LOAD; 17 | irom0_0_phdr PT_LOAD; 18 | } 19 | 20 | 21 | /* Default entry point: */ 22 | ENTRY(call_user_start) 23 | PROVIDE(_memmap_vecbase_reset = 0x40000000); 24 | /* Various memory-map dependent cache attribute settings: */ 25 | _memmap_cacheattr_wb_base = 0x00000110; 26 | _memmap_cacheattr_wt_base = 0x00000110; 27 | _memmap_cacheattr_bp_base = 0x00000220; 28 | _memmap_cacheattr_unused_mask = 0xFFFFF00F; 29 | _memmap_cacheattr_wb_trapnull = 0x2222211F; 30 | _memmap_cacheattr_wba_trapnull = 0x2222211F; 31 | _memmap_cacheattr_wbna_trapnull = 0x2222211F; 32 | _memmap_cacheattr_wt_trapnull = 0x2222211F; 33 | _memmap_cacheattr_bp_trapnull = 0x2222222F; 34 | _memmap_cacheattr_wb_strict = 0xFFFFF11F; 35 | _memmap_cacheattr_wt_strict = 0xFFFFF11F; 36 | _memmap_cacheattr_bp_strict = 0xFFFFF22F; 37 | _memmap_cacheattr_wb_allvalid = 0x22222112; 38 | _memmap_cacheattr_wt_allvalid = 0x22222112; 39 | _memmap_cacheattr_bp_allvalid = 0x22222222; 40 | PROVIDE(_memmap_cacheattr_reset = _memmap_cacheattr_wb_trapnull); 41 | 42 | SECTIONS 43 | { 44 | 45 | .dport0.rodata : ALIGN(4) 46 | { 47 | _dport0_rodata_start = ABSOLUTE(.); 48 | *(.dport0.rodata) 49 | *(.dport.rodata) 50 | _dport0_rodata_end = ABSOLUTE(.); 51 | } >dport0_0_seg :dport0_0_phdr 52 | 53 | .dport0.literal : ALIGN(4) 54 | { 55 | _dport0_literal_start = ABSOLUTE(.); 56 | *(.dport0.literal) 57 | *(.dport.literal) 58 | _dport0_literal_end = ABSOLUTE(.); 59 | } >dport0_0_seg :dport0_0_phdr 60 | 61 | .dport0.data : ALIGN(4) 62 | { 63 | _dport0_data_start = ABSOLUTE(.); 64 | *(.dport0.data) 65 | *(.dport.data) 66 | _dport0_data_end = ABSOLUTE(.); 67 | } >dport0_0_seg :dport0_0_phdr 68 | 69 | .data : ALIGN(4) 70 | { 71 | _data_start = ABSOLUTE(.); 72 | *(.data) 73 | *(.data.*) 74 | *(.gnu.linkonce.d.*) 75 | *(.data1) 76 | *(.sdata) 77 | *(.sdata.*) 78 | *(.gnu.linkonce.s.*) 79 | *(.sdata2) 80 | *(.sdata2.*) 81 | *(.gnu.linkonce.s2.*) 82 | *(.jcr) 83 | _data_end = ABSOLUTE(.); 84 | } >dram0_0_seg :dram0_0_phdr 85 | 86 | .rodata : ALIGN(4) 87 | { 88 | _rodata_start = ABSOLUTE(.); 89 | *(.rodata) 90 | *(.rodata.*) 91 | *(.gnu.linkonce.r.*) 92 | *(.rodata1) 93 | __XT_EXCEPTION_TABLE__ = ABSOLUTE(.); 94 | *(.xt_except_table) 95 | *(.gcc_except_table) 96 | *(.gnu.linkonce.e.*) 97 | *(.gnu.version_r) 98 | *(.eh_frame) 99 | /* C++ constructor and destructor tables, properly ordered: */ 100 | KEEP (*crtbegin.o(.ctors)) 101 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) 102 | KEEP (*(SORT(.ctors.*))) 103 | KEEP (*(.ctors)) 104 | KEEP (*crtbegin.o(.dtors)) 105 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) 106 | KEEP (*(SORT(.dtors.*))) 107 | KEEP (*(.dtors)) 108 | /* C++ exception handlers table: */ 109 | __XT_EXCEPTION_DESCS__ = ABSOLUTE(.); 110 | *(.xt_except_desc) 111 | *(.gnu.linkonce.h.*) 112 | __XT_EXCEPTION_DESCS_END__ = ABSOLUTE(.); 113 | *(.xt_except_desc_end) 114 | *(.dynamic) 115 | *(.gnu.version_d) 116 | . = ALIGN(4); /* this table MUST be 4-byte aligned */ 117 | _bss_table_start = ABSOLUTE(.); 118 | LONG(_bss_start) 119 | LONG(_bss_end) 120 | _bss_table_end = ABSOLUTE(.); 121 | _rodata_end = ABSOLUTE(.); 122 | } >dram0_0_seg :dram0_0_phdr 123 | 124 | .bss ALIGN(8) (NOLOAD) : ALIGN(4) 125 | { 126 | . = ALIGN (8); 127 | _bss_start = ABSOLUTE(.); 128 | *(.dynsbss) 129 | *(.sbss) 130 | *(.sbss.*) 131 | *(.gnu.linkonce.sb.*) 132 | *(.scommon) 133 | *(.sbss2) 134 | *(.sbss2.*) 135 | *(.gnu.linkonce.sb2.*) 136 | *(.dynbss) 137 | *(.bss) 138 | *(.bss.*) 139 | *(.gnu.linkonce.b.*) 140 | *(COMMON) 141 | . = ALIGN (8); 142 | _bss_end = ABSOLUTE(.); 143 | _heap_start = ABSOLUTE(.); 144 | /* _stack_sentry = ALIGN(0x8); */ 145 | } >dram0_0_seg :dram0_0_bss_phdr 146 | /* __stack = 0x3ffc8000; */ 147 | 148 | .text : ALIGN(4) 149 | { 150 | _stext = .; 151 | _text_start = ABSOLUTE(.); 152 | *(.entry.text) 153 | *(.init.literal) 154 | *(.init) 155 | *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) 156 | *(.fini.literal) 157 | *(.fini) 158 | *(.gnu.version) 159 | _text_end = ABSOLUTE(.); 160 | _etext = .; 161 | } >iram1_0_seg :iram1_0_phdr 162 | 163 | .lit4 : ALIGN(4) 164 | { 165 | _lit4_start = ABSOLUTE(.); 166 | *(*.lit4) 167 | *(.lit4.*) 168 | *(.gnu.linkonce.lit4.*) 169 | _lit4_end = ABSOLUTE(.); 170 | } >iram1_0_seg :iram1_0_phdr 171 | 172 | .irom0.text : ALIGN(4) 173 | { 174 | _irom0_text_start = ABSOLUTE(.); 175 | *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) 176 | _irom0_text_end = ABSOLUTE(.); 177 | } >irom0_0_seg :irom0_0_phdr 178 | } 179 | 180 | /* get ROM code address */ 181 | INCLUDE "../ld/eagle.rom.addr.v6.ld" 182 | --------------------------------------------------------------------------------