Commit graph

86 commits

Author SHA1 Message Date
Robert Quattlebaum b8c0f2de6c cpu/native: Add file-backed simulated EEPROM to native cpu.
This patch removes a defunct EEPROM implementation from the native
platform and provides a new EEPROM implementation for the native cpu.
The previous implementation appears to be vestigal.

This is useful for testing code which uses the EEPROM without running
the code on the actual hardware.

By default the code will create a new temporary file as the EEPROM
backing, reinitializing each time. If you would like to preserve the
EEPROM contents or specify a specific EEPROM file to use, you can set the
`CONTIKI_EEPROM` environment variable to the name of the EEPROM file you
wish to use instead. If it already exists, its contents will be used.
If it does not already exist, it will be created and initialized by
filling it with `0xFF`---just like a real EEPROM.

A new example is also included, which was used to verify the correctness
of the implementation. It can easily be used to verify the EEPROM
implementations of other targets.
2013-05-18 10:29:41 -07:00
Oliver Schmidt d5d8de7372 Merge pull request #181 from mmuman/ctk-ncurses-try4
TODOs:
- Check FreeBSD
- Adjust Makefile.target
2013-03-31 14:36:30 -07:00
François Revol 476be8de7e ctk-curses: style fixes
Thanks tools/contiki-indent
2013-03-31 04:07:03 +02:00
François Revol 3633c52bcb ctk-curses: whitespace fixes 2013-03-30 23:34:18 +01:00
François Revol a03334a59d ctk-curses: style fixes 2013-03-30 23:26:22 +01:00
François Revol 8daf2b6659 ctk-curses: remove unused code
The setupterm() call is not needed when using curses.
2013-03-30 23:15:08 +01:00
François Revol 976746f97f ctk-curses: cleanup 2013-03-30 23:07:38 +01:00
François Revol 5a4382a996 ctk-curses: uncomment refresh() calls
I'm not yet sure they are required there but it shouldn't hurt.
2013-03-30 23:03:04 +01:00
François Revol 065c25cfc5 ctk-curses: uncomment nonl() call and fix return key handling 2013-03-30 23:00:44 +01:00
François Revol f63aada8b6 ctk-curses: make sure gcc finds ncurses headers on cygwin
They are located in /usr/include/ncurses
2013-03-30 18:11:17 +01:00
François Revol 45662ac1ef ctk-curses: add some comments for clarity 2013-03-30 17:57:01 +01:00
François Revol ada305a3be ctk-curses: Introduce CTK-specific color names
Since ncurses also defines COLOR_BLACK and friends, and we want
to avoid including curses.h in contiki-conf.h, define CTK_COLOR_*
constants and map them to curses colors in ctk-curses.c.
2013-03-26 11:37:10 +01:00
François Revol 56f11e7524 ctk-curses: C89
At least Haiku still uses gcc2 by default.
2013-03-26 08:51:37 +01:00
François Revol 54199d7121 ctk-curses: add CURSES_LIB to TARGET_LIBFILES, not LDFLAGS
It seems TARGET_LIBFILES is used at the end of the link command,
unlike LDFLAGS, which should help when only a static curses lib is
available, like on Haiku.
2013-03-26 08:10:59 +01:00
Nicolas Tsiftes f8edbbb8d2 Merge pull request #178 from adamdunkels/feature-contiki-default-conf
A first stab at a default configuration system
2013-03-25 20:13:15 -07:00
François Revol 2bb9ced3d6 ctk-curses: Guard ncurses-specific mouse function calls
The mouse support is ncurses-specific so guard it with proper #ifdef.
2013-03-26 02:01:28 +01:00
François Revol 86cb1769f6 ctk-curses: Remove extra mouse events pumping loop
It was added to avoid getting garbage keyboard input in some cases,
however it seems not to happen very often and might be the cause
of hang in OSX. If garbage input happens again we can always try
to pump a single event each time instead of looping anyway.
2013-03-26 01:49:05 +01:00
François Revol 343a7643b7 ctk-curses: Introduce CURSES_LIB makefile variable
This should allow overriding it depending on $(HOST_OS).
2013-03-26 01:12:09 +01:00
François Revol b7601c3acb ctk-curses: Cleanup 2013-03-20 17:16:37 +01:00
François Revol 1ce1232d0f ctk-curses: Add configuration for various apps 2013-03-20 02:01:05 +01:00
François Revol 06d3c14213 ctk-curses: Enable screensaver 2013-03-20 02:01:05 +01:00
François Revol 1c5d6a9db7 ctk-curses: Cleanup + fixes
* Cleanup
* Fix warnings
* Fix indentation
* Only wait 1ms for keyboard timeout
* Hide text cursor
* Pump mouse events just in case
* Add F9 as menu key since F10 is used as menu trigger by Gnome
2013-03-20 02:00:32 +01:00
François Revol db982f7b82 ctk-curses: Add mouse support to the ncurses CTK backend. 2013-03-20 01:35:42 +01:00
François Revol 25e3f828aa Ncurses-based CTK backend for the native platform. 2013-03-20 01:35:01 +01:00
François Revol 3d33248eff native: Fix trailing whitespace 2013-03-19 20:00:26 +01:00
François Revol 877b059bc7 native: Use stderr for logging
Since we will hopefully one day use stdout as a CTK display,
use stderr instead for log output, which can be redirected to a file.
2013-03-19 19:24:59 +01:00
Adam Dunkels 277a348f60 Changed the name of the IPv6 number of route entries configuration from UIP_CONF_DS6_ROUTE_NBU to UIP_CONF_MAX_ROUTES. 2013-03-18 11:12:44 +01:00
Robert Quattlebaum 5afcbf6fff Makefiles: Allow setting UIP_CONF_IPV6=0 to work as expected.
Setting UIP_CONF_IPV6 to zero from the make build command line is
something that seems like it should ensure that IPv6 is disabled, but in
fact it actually *enables* IPv6. This seems counter intuitive, so this
patch changes the behavior of the makefiles to handle this case
properly.
2013-01-14 22:03:42 -08:00
Adam Dunkels 944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Joakim Eriksson 7482fd6962 quick fix for enabling native-border router to run under windows - need to cleanup the arguments 2012-03-27 11:09:54 +02:00
Ilya Dmitrichenko 499d3052ee Fixed TARGET=native compilation issues on Darwin. 2012-03-02 15:15:42 -05:00
Ilya Dmitrichenko 9c99d46e24 Simplified host OS platform detection in Makefiles 2012-02-25 10:09:33 -05:00
Nicholas J Humfrey 680225e99d Converted u8_t to uint8_t and u16_t to uint16_t in the platforms directory.
Added "These names are deprecated, use C99 names" warnings the contiki-conf.h files that were missing it.
2012-02-21 08:33:25 -05:00
Niclas Finne aceb36c66b Replaced SELECT_CALLBACK with an API that supports multiple select callbacks 2012-01-19 17:52:01 +01:00
David Kopf b251619a2f Add wpcap for cygwin/Windows native border router 2012-01-08 13:37:56 -05:00
Joakim Eriksson 5da8a9261b fixed so that it works for non IPv6 applications 2012-01-06 03:59:43 -08:00
Joakim Eriksson c3af79b795 Made native main loop sleep a bit more 2012-01-01 09:29:33 +01:00
Niclas Finne 8b83ffec67 Added native-border-router and slip-radio 2012-01-01 09:29:33 +01:00
Nicolas Tsiftes 39ea9405bb Added a function for setting the I/O semantics on a Coffee file descriptor. Changed the configuration parameters slightly and updated the platform definitions to reflect this change. 2011-02-09 15:03:57 +01:00
nvt-se 375e1d76ef Print the error if select fails 2011-01-21 14:19:57 +00:00
adamdunkels 951fd78f6c ctimer moved from net/rime to sys/ 2010-06-14 18:58:45 +00:00
adamdunkels 757ca59511 Added netstack init to native platform 2010-02-23 18:43:21 +00:00
adamdunkels 14ddf7450d Initialize ctimers 2010-02-03 16:47:26 +00:00
adamdunkels 4f6f6c972d Use new sensors API 2010-01-14 20:15:55 +00:00
adamdunkels fe126bc90e Updated to match the new sensors API 2010-01-14 15:38:56 +00:00
nvt-se fc34a4572b Removed the deprecated COFFEE_DIR_CACHE_ENTRIES parameter. 2009-09-22 16:31:36 +00:00
adamdunkels bddd31abf2 Fixed compiler warnings 2009-09-09 21:06:51 +00:00
nvt-se b0431cc688 removed obsolete offset type definitions. 2009-07-13 20:02:16 +00:00
nvt-se 1e0ca9ceac Made the use of micro logs configurable to make file modifications
more efficient on storage types that support inline updates.

The sky platform uses logs, and the native platform uses no logs.
2009-06-29 13:30:16 +00:00
adamdunkels 00890caca8 Make sure that symbols.c is included in every native cpu build, not just the native target 2009-05-12 17:23:23 +00:00