Commit Graph

36 Commits

Author SHA1 Message Date
TerryE 49733f6f6d Add New Tasking I/F and rework GPIO, UART, etc to support it
As with the last commit this rolls up the follwowing, but include the various
review comments on the PR.

-   **Documentation changes**. I've added the taks FAQ as a stub new Extension
developer FAQ, and split the old FAQ into a Lua Developer FAQ and a Hardware
FAQ.

-   **Tasking I/F**.  New `app/task/Makefile`, `app/task/task.c`,
`app/include/task/task.h` and `app/Makefile` as per previous commit.  Cascade
changes to `app/driver/uart.c`, `app/include/driver/uart.h`,
`app/user/user_main.c` and `app/modules/node.c`

-   **GPIO Rework** to `app/modules/gpio.c` and `pin_map.[hc]`, `platform.[hc]`
in `app/platform`

-   **Other Optimisations** Move the `platform_*_exists()` from
`app/platform/common.c` to static inline declarations in `platform.h` as
this generates faster, smaller code. Move lgc.a routines out of iram0.
2016-02-17 17:13:17 +00:00
Johny Mattsson d5f71eb0c6 Simplified linker script handling of libc.
Having ascertained that the SDK itself has no (zero, zilch, nada) dependencies
on the standard C library, the NodeMCU linker script now puts any and all
libc functions into irom, rather than carefully picking the ones that
were used by NodeMCU some months ago. This should help keep iram free for
the things which really need to be in iram (such as ISRs).
2016-01-28 17:56:01 +11:00
Johny Mattsson a6c0873a28 Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
Removed earlier TCP port randomisation fix - the new SDK has its own fix
even though Espressif told me they wouldn't fix it. Yay?
2015-12-23 11:17:05 +11:00
Johny Mattsson 9003d3e8fb Rework NODEMCU_MODULE() to not pull in extra gunk.
Third time lucky. I hope. Hi Terry.
2015-12-18 13:10:48 +11:00
Johny Mattsson 4e8ef87d03 Reworked module registration, removed modules.h
Module creation & registration now made a lot simpler. In essence,
each module file is now self-contained and only needs a

  NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);

line to both be automatically recognised by the Lua initialization
as well as honor the LUA_USE_MODULES_MYNAME #define.
2015-12-16 16:09:16 +11:00
Johny Mattsson 4888c5fc62 Ensure ld-provided port alias is properly aligned. 2015-11-17 11:49:10 +11:00
Johny Mattsson f82415f6b9 Fix to do TCP port number randomization at boot.
This addresses the issue where a server would otherwise reject a valid
connection attempt from a rebooted node, due to the server thinking that
packet belonged to a recently closed session. By starting off the local
TCP port numbers at random* points each boot the risk of port reuse
across a reboot is significantly reduced.

*) As random as can be had via the lower 12 bits of the ccounter.
2015-11-05 14:40:57 +11:00
Johny Mattsson fe6289a6c2 Switch Lua input to event driven instead of polled.
The Lua input timer has been the thorn in the side which prevents a lot of
potential sleeping, unnecessarily.
2015-10-12 13:26:05 +11:00
Johny Mattsson 30380f6cff Further cleanup of ld directory.
Renamed the main linker script to make it clear it is customised for NodeMCU
and not to be confused with the standard linker SDK linker scripts.

Changed to using the eagle.rom.addr.v6.ld file from the SDK.
2015-10-12 13:26:04 +11:00
Johny Mattsson e4ba75652d Fixed missing iram0.text segment.
Trust me, without this things behave *very* strangely!
2015-10-12 13:26:04 +11:00
Johny Mattsson 8bdde6e28d Sorted out linker scripts & options.
Now boots to Lua prompt, but promptly reboots itself before input.
2015-10-12 13:26:04 +11:00
vowstar fb0e4722b8 Fix and support Wi-Fi smart link (esp-touch and air-kiss).
Espressif open-source android and iOs APP,
See also https://github.com/espressifapp
Note: Must use ESP-TOUCH-V021 in espressif app history.
2015-07-04 02:27:51 +08:00
devsaurus 277c6d0116 move u8g progmem constants to new .rodata sections
this simplifies the overall memory handling based on the irom support by @jmattsson
2015-06-25 00:38:11 +02:00
Johny Mattsson b0f9788a6d Move constants to ROM. Frees up 16k+ of RAM.
Accessing 8bit and 16bit constants from ROM rather than RAM comes with a
performance cost, as these loads go through the load/store exception
vector. Any performance critical constants can be forced back into RAM
as RAM_CONST_ATTR.

The entry point has changed from call_user_start() to user_start_trampoline()
in order for the exception handler to be installed early enough.
2015-06-23 15:41:14 +10:00
HuangRui 71469dd70f Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware
Conflicts:
	app/include/user_version.h
	app/modules/node.c
	app/modules/wifi.c
2015-05-15 08:13:46 +08:00
funshine 09750b5653 add queue to mqtt module 2015-03-30 00:24:09 +08:00
funshine 9d0c733073 Merge branch 'dev' into dev096 2015-03-06 16:46:37 +08:00
funshine 45f6abd448 merge coap 2015-03-06 16:24:55 +08:00
funshine 13b08cdacf add macro to control built-in lib for lua, add libm.a 2015-03-06 15:55:24 +08:00
HuangRui 6ea3d6390c Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware
Conflicts:
	app/include/user_config.h
	ld/eagle.app.v6.ld
2015-03-06 14:02:58 +08:00
HuangRui 05fe3ea9f1 Update to SDK 0.9.6_b1
The open source LWIP is broken, use espressif's liblwip.a.
Uses system_get_vdd33 instead of readvdd33.
The espressif's sdk0.9.6 beta1 (2015.02.15) release note
1、Optimize smartconfig to version v0.8;
2、Optimize AT to version 0.22.b1;
1>、Fixed bugs;
2>、Optimize the speed of transparent transmission;
3、Optimize boot to version 1.3(b3);
1>、Fix compatibility problem of dual flash ;
4、Solve problem of the large current in deep sleep;
5、Fixed problem “check mem fail”;
6、Fixed problem of UDP socket may stop listening broadcast packet after a long time running under some special router;
7、Fixed bug related to wifi_station_scan;
8、Other optimize to make the software more reliable;
2015-02-16 11:37:39 +08:00
devsaurus bf1969e555 increase irom0 2015-02-13 22:06:42 +01:00
funshine 2d711bbc0d update spiffs to 0.2.2, add file.rename api 2015-02-11 21:20:54 +08:00
devsaurus f2c881db18 Merge remote-tracking branch 'upstream/dev' into dev 2015-02-10 21:40:29 +01:00
devsaurus 27d99643df rotation functions 2015-02-08 17:59:09 +01:00
funshine c529d56a8f minor fix to debug mode 2015-02-07 23:08:25 +08:00
devsaurus d7f04a1de8 further reduce RAM usage, consolidate font memory and "PROGMEM" 2015-02-06 23:02:56 +01:00
funshine 4754064ecf add coap module, see fragment.lua for usage 2015-02-05 01:32:57 +08:00
devsaurus 9f0b167832 improve font handling
* macros established to build a table of fonts which get compiled into the image
* font data is mapped to irom0 to save dram space
* quirky function to retrieve font data 4-byte aligned from irom0
2015-02-04 00:08:39 +01:00
devsaurus 6b3abb004a * increase irom0_0_seg size to accomodate u8glib code
* implement first functions for graphics test
2015-02-01 17:27:19 +01:00
HuangRui 530e964d95 Try to ENABLE floating point, lack %g support. 2015-01-26 04:15:54 +08:00
funshine ad966146fc migrate to sdk 0.9.5 release version 2015-01-24 23:36:04 +08:00
funshine 617574d441 fix eclipse project 2015-01-09 15:58:39 +08:00
HuangRui cb4a49e0db Changed Makefile to support Windows xcc. 2015-01-05 13:15:59 +08:00
HuangRui c04f2578ec Updated SDK to v0.9.5 and optimized memory. 2015-01-05 10:09:51 +08:00
funshine cdd13b1af3 source file first commit, folder structure refact 2014-12-22 19:35:05 +08:00