Commit graph

978 commits

Author SHA1 Message Date
Adam Dunkels aaac20a950 Merge pull request #225 from tecip-nes/pic32_minor_reorganization
Pic32 minor reorganization
2013-05-19 14:22:14 -07:00
Robert Quattlebaum 9c17a542a7 avr/bootloader.c: Now compatible with bootloaders which always run first.
The boot loader now knows when to go into bootstrap mode by
looking for a specific EEPROM value. Also updated code style
to match Contiki code style guidelines.
2013-05-19 08:21:16 -07:00
Robert Quattlebaum 535e90343c Merge pull request #144 from darconeous/pull-requests/settings-for-all-targets
core/lib/settings: Generalized settings manager to work on any platform
2013-05-18 12:03:09 -07:00
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
Giovanni evilaliv3 Pellerano c33d51e762 pic32 minor cleanups 2013-05-17 14:32:39 +02:00
Adam Dunkels 59a8df14a8 Merge pull request #189 from sieben/markdown
Update to markdown
2013-05-16 00:24:25 -07:00
François Revol 7967779e6c tapdev: Fix using an uninitialized buffer 2013-04-20 14:42:19 +02:00
George Oikonomou 704309cfd4 Change the InfoPage Location of the IEEE address 2013-04-17 15:44:01 +01:00
George Oikonomou 8b5b2bd4d8 CC2538 Documentation typo and grammar fixes 2013-04-17 15:41:41 +01:00
George Oikonomou 007e113ea9 Improve handling of CDC ACM line state
- For the CC2538, simplify handling of USB_CDC_ACM_LINE_STATE
  events. Ignore the Carrier Control (RTS) bit when receiving
  a SET_CONTROL_LINE _STATE request, we are a full duplex device.
- Improve behaviour of the CC2531 USB stick when there is no
  process on the host to read IN data. Basically, we adopt the
  CC2538 approach and we only send data when a DTE is present
2013-04-16 15:49:05 +01:00
George Oikonomou 40f49948e6 New Platform: TI CC2538 Development Kit
This commit adds cpu, platform and example files,
providing support for running Contiki on TI's cc2538 DK
2013-04-06 21:07:31 +01:00
Rémy Léone e6bd4f1dde Rename to md 2013-03-26 23:15:37 +01:00
Rémy Léone 7b40a568a6 Update to markdown
- Spellchecking
- Update plain text to github markdown
2013-03-26 16:55:19 +01:00
Robert Quattlebaum 28a1e40ebd core/lib/settings: Generalized Settings Manager to work on any platform
This commit moves the Settings Manager from the AVR codebase
into the Contiki core library. Any platform that implements
the Contiki EEPROM API can now use the Settings Manager's
key-value store for storing their persistent configuration info.

The Settings Manager is a EEPROM-based key-value store. Keys
are 16-bit integers and values may be up to 16,383 bytes long.
It is intended to be used to store configuration-related information,
like network settings, radio channels, etc.

 * Robust data format which requires no initialization.
 * Supports multiple values with the same key.
 * Data can be appended without erasing EEPROM.
 * Max size of settings data can be easily increased in the future,
   as long as it doesn't overlap with application data.

The format was inspired by the [OLPC manufacturing data format][].

Since the beginning of EEPROM often contains application-specific
information, the best place to store settings is at the end of EEPROM
(the "top"). Because we are starting at the end of EEPROM, it makes
sense to grow the list of key-value pairs downward, toward the start of
EEPROM.

Each key-value pair is stored in memory in the following format:

Order    | Size     | Name         | Description
--------:|---------:|--------------|-------------------------------
       0 |        2 | `key`        | 16-bit key
      -2 |        1 | `size_check` | One's-complement of next byte
      -3 |   1 or 2 | `size`       | The size of `value`, in bytes
-4 or -5 | variable | `value`      | Value associated with `key`

The end of the key-value pairs is denoted by the first invalid entry.
An invalid entry has any of the following attributes:

 * The `size_check` byte doesn't match the one's compliment of the
   `size` byte (or `size_low` byte).
 * The key has a value of 0x0000.

[OLPC manufacturing data format]: http://wiki.laptop.org/go/Manufacturing_data
2013-03-20 11:57:13 -07:00
Oliver Schmidt 6ba28bf74f Merge pull request #180 from mmuman/cleanup-and-fixes
Cleanup and fixes
2013-03-20 02:37:24 -07:00
François Revol 22bcb07c61 tapdev: Log to stderr; add tracing
Use stderr for logging to avoid polluting stdout.
Add some DEBUG tracing.
2013-03-19 19:41:20 +01:00
Adam Dunkels a5046e83c7 Cleanup and refactoring of the STM32w port
This is a general cleanup of things like code style issues and code structure of the STM32w port to make it more like the rest of Contiki is structured.
2013-03-18 13:31:26 +01:00
RongHQ 12b3d02ba1 Fix a syntax error in /cpu/cc253x/dev/uart0.c 2013-03-16 19:41:42 +08:00
Oliver Schmidt a0e2120fdb Added configurations of the new resolver. 2013-03-14 23:17:59 +01:00
George Oikonomou cc37a1e46e Fix cc2530 DMA priority define values
Fixes #156
2013-03-12 15:39:59 +00:00
Adam Dunkels 39e5a8c6dc Merge pull request #80 from darconeous/mdns-resolv
Adds IPv6 and MDNS domain name resolution.
2013-03-10 12:58:39 -07:00
Adam Dunkels c7ef7198a8 Merge pull request #85 from darconeous/native-target-osx
Various updates to the minimal-net platform.
2013-03-10 12:48:07 -07:00
Robert Quattlebaum 1d113f52ad core/net/uip: Rename uip_ethaddr to uip_lladdr.
There isn't really a good reason I can think of for these
to be different between IPv4 and IPv6.
2013-03-10 11:39:11 -07:00
Nicolas Tsiftes a8dc74bda8 Merge pull request #133 from darconeous/pull-requests/cpu-avr-gc-sections
cpu/avr: Make sure that GCC removes all unused symbols.
2013-03-07 12:52:24 -08:00
Mariano Alvira ab8fe95864 Revert "Merge pull request #120 from Jeff-Ciesielski/stm32_cl"
This reverts commit 029bc0ee27, reversing
changes made to a7b3e99644.

This uses LGPL libopencm3. While the patch doesn't include the code,
the resulting binary would force the release of all code as LGPL.
2013-03-02 08:11:28 -05:00
Robert Quattlebaum 67a39618eb cpu/avr: Make sure that GCC removes all unused symbols.
This magic comes from the `--gc-sections` linker flag, which turns on garbage collection for unused input sections. The compiler flags `-ffunction-sections` and `-fdata-sections` make sure that each function and each static data definition have their own section. The result is that GCC can prune away all unused symbols, reducing the size of the resulting executable.

These optimizations may be disabled by setting the Makefile variable
`SMALL` to zero.
2013-02-28 21:59:19 -08:00
Robert Quattlebaum 38b2863831 Update cpu/native/Makefile.native 2013-02-26 11:29:04 -08:00
Nicolas Tsiftes 42e4b2b02a Merge pull request #143 from idelamer/master
Bug fix for Issue #88
2013-02-24 15:26:38 -08:00
Mariano Alvira 029bc0ee27 Merge pull request #120 from Jeff-Ciesielski/stm32_cl
Add initial support for STM32F1x Connectivity Line devices
2013-02-24 15:08:57 -08:00
Oliver Schmidt c6620e47aa Merge pull request #131 from oliverschmidt/master
Two minor retro-specific changes.
2013-02-16 15:12:52 -08:00
Oliver Schmidt 61b90c0126 We actually need PROJECT_OBJECTFILES and PROJECT_LIBRARIES for retro builds too. 2013-02-16 22:57:50 +01:00
Nicolas Tsiftes 2eb3c2a492 Merge pull request #94 from alignan/master
Fixes Issue #93
2013-02-16 13:46:09 -08:00
Ivan Delamer c22838b9d3 Enable Timer1 on Raven so that interrupts coming from radio, which are
connected to input capture, fire again.
2013-02-15 16:08:37 -07:00
Oliver Schmidt 98060c1eab Moved from last cc65 release (2.13.3) to recent cc65 snapshot (2.13.9).
Relevant cc65 changes...

General:
- The compiler generates "extended" dependency info (like gcc) so there's no need for postprocessing whatsoever :-)
- The linker is very pernickety regarding the ordering of cmdline options so a custom linker rule is necessary :-(

Apple2:
- The various memory usage scenarios aren't specified anymore via separate linker configs but via defines overriding default values in the builtin linker config.

Atari:
- The builtin linker config allows to override the start addr so there no more need for a custom linker config.
- The C library comes with POSIX directory access. So there's no more need for for a custom coding.

CBM:
- The C library comes with POSIX directory access. So there's no more need for for a custom coding.
2013-02-14 15:42:43 +01:00
Jeff Ciesielski 6b97fa8382 stm32f1x_cl: Fix stm32f107 linker script
This is a critical fix which adds inclusion of the entire data/bss
section to the output ELF file.  Without it, the BSS section will not
be zeroed out
2013-02-09 23:54:14 -08:00
Oliver Schmidt c7f986faf5 Merge pull request #121 from oliverschmidt/master
Several minor adjustments.
2013-02-08 17:04:04 -08:00
Oliver Schmidt 9938cb6838 Adjusted names. 2013-02-09 01:58:37 +01:00
Jeff Ciesielski 5c6018f0e2 stm32f1x_cl: Add initial support for STM32F1x connectivity line
This currently supports the stm32f107, but support will be added for
the F105 shortly (missing a linker script and I can't properly test
without a devkit).
2013-02-06 15:41:50 -08:00
Mariano Alvira fb8bbf37cf Use the RTC only as the main timer.
This is a major change to how the main tick interrupt is handled on
the mc1322x platforms. Instead of using two timer resources, TMR0 and
RTC, this patch unifies all the timers to use the RTC. This is enabled by
implementing etimers as scheduled rtimers. The main advantage (aside
from freeing TMR0 for general use) is have the Contiki timebase come
from the same source that will be used for sleeping and wakeup.
2013-02-03 15:15:05 -05:00
Mariano Alvira ad55ccdec4 add working routines to turn the mc1322x radio on and off 2013-02-03 14:48:38 -05:00
Oliver Schmidt 69317ad1db Renamed retro 'dhcp-client' to 'ipconfig' as it can as well be used for interactive manual configuration. 2013-02-01 21:20:21 +01:00
Oliver Schmidt 74dfff972f Do not reject frames with a length exactly equal to the uIP bufer size. 2013-01-30 23:39:01 +01:00
Robert Quattlebaum a571b663b0 platform/minimal-net: Better, more seamless support for OS X.
This patch enables automatic route setup and cleanup when
starting and stopping the minimal-net target on OS X.

Both IPv4 and IPv6 are supported.

Using the minimal-net target on OS X was absolute hell
before I came up with this patch. Now it is painless.
2013-01-30 09:17:30 -08:00
Robert Quattlebaum 092b6f3baa platform/minimal-net: Implement better idle behavior.
The minimal-net target, as currently written, wakes up the
CPU every millisecond to check for packets, and will only
react in real-time to input from stdin. If you are running
this on a laptop battery, your battery will quickly drain.

This change allows the CPU to idle when there is literally
nothing to do while still being responsive to input from
stein and/or incoming packets. This fix should significantly
improve performance while significantly improving power
usage. Win-win.

Also added `_xassert()` implementation so that the contiki-
provided `assert()` macro will work properly when used
on this platform.
2013-01-30 09:17:29 -08:00
Oliver Schmidt e88997b71c Minor README updates. 2013-01-29 22:44:37 +01:00
Antonio Lignan 2cf4e30b11 Baudrate now is configured taking into account the MCU frequency, instead of using fixed values for 8MHz freq 2013-01-29 12:23:23 +01:00
Oliver Schmidt 1a5e20bc5f Remove tab chars from retro C sources. 2013-01-28 23:43:08 +01:00
George Oikonomou eea6b9051d Removed a stray leds_toggle 2013-01-09 22:46:20 +00:00
Adam Dunkels 326781ef43 Merge pull request #74 from malvira/maca-dummy-rx
Receive packets in a dummy_rx when the maca packet pool is
2013-01-06 14:10:23 -08:00
Mariano Alvira a53e653bbf Receive packets in a dummy_rx when the maca packet pool is
empty. These packets get dropped.
2013-01-06 15:12:07 -05:00
Mariano Alvira 64ded5aecc run the linker script through CPP so that the stack sizes can be
changed using CONF parameters via DEFINES (e.g. SYS_CONF_STACK_SIZE
4096)
2013-01-05 17:08:59 -05:00
Giovanni `evilaliv3` Pellerano ee556dcf14 minor corrections to adhere contiki code style guidelines 2012-12-21 12:36:29 +01:00
Giovanni `evilaliv3` Pellerano f68df3a81c added support for pic32 (PIC32MX795F512L) 2012-12-17 09:14:23 +01:00
George Oikonomou 380ee3bae9 Code style fixes: cc253x 2012-12-16 19:28:56 +00:00
George Oikonomou 874bec26a5 Code style fixes: cc2430 2012-12-16 19:28:55 +00:00
Arngrimur Bjarnason b533a683c3 Changed makefile. Removed extra slash 2012-12-10 20:41:43 +01:00
Mariano Alvira f60a00b93e the contiki-maca process should wait for a poll event 2012-12-02 14:26:51 -05:00
Mariano Alvira b3bb3ff53d fix very incorrect insert_at_rx_head; the bugged version would make
the rest of the rx list dangling.

this is used to insert the ack packet needed by the upper layers in
the netstack.
2012-12-02 14:25:39 -05:00
Mariano Alvira f7d1d78ac9 disable pad keeper when using ADC pin; otherwise you'll see a 20k input
impedance.
2012-11-30 10:44:26 -05:00
Adam Dunkels db41a51ae6 Make gcc default LD, and allow override with LD_OVERRIDE 2012-11-21 19:46:31 +01:00
Ilya Dmitrichenko d0f18e5d04 Fixed LDFLAGS for cross-compiling of "native" 2012-11-21 18:09:29 +00:00
Ilya Dmitrichenko 092c69639c Enable native target for cross-compiling -
by now it would have worked if you set CC via
command line (e.g. `make CC=clang`, though it
wouldn't work when CC is set in the platform
makefile which includes `Makefile.native`.
2012-11-21 18:09:10 +00:00
Mariano Alvira 03ab3fe317 Newer and cleaner TARGET=econotag as well as robust mc13224v
configuration system.

(also deprecate TARGET=redbee-econotag)

- mc13224v now automatically probes hardware config for buck converter
and 32kHz crystal as well as automatically monitors battery voltage
and manages the buck accordingly.

- new flashed based config system for mc13224v parameters such has
  radio modes (demod, autoack), nvmtype, mac address, channel and
  power.

- considerably cleaned up econotag platform code (suffered from severe
  case of bit-rot)
2012-11-19 19:16:29 -05:00
Mariano Alvira 2c9a538582 Merge branch 'master' of git://git.devl.org/git/malvira/libmc1322x into bump-libmc1322x
bump libmc1322x to 7bee48243c

Conflicts:
	cpu/mc1322x/board/Makefile.board
	cpu/mc1322x/lib/include/uart.h
	cpu/mc1322x/lib/uart1.c
	cpu/mc1322x/lib/uart2.c
	cpu/mc1322x/src/default_lowlevel.c
2012-11-18 18:27:39 -05:00
Etienne Duble 7905316c54 Fix: stm32w flasher for Ubuntu 12.04 and later 2012-11-09 14:14:57 +01:00
Etienne Duble ecdbbaec9a Fix: handle stm32f-based serial interfaces (/dev/ttyACMx) 2012-11-09 14:00:16 +01:00
George Oikonomou 79cffa030f cc2531: USB CDC-ACM code style fixes
Closes #18
2012-11-01 17:42:04 +00:00
George Oikonomou 1a0f01ccc4 cc253x: Config to swap between UART and USB I/O
See Pull Request #18
2012-11-01 17:41:57 +00:00
Philippe Rétornaz eabaa0c8e4 cc253x: DMA Changes
- Fixed DMA irq flag clearing
- Added a dma_reset helper

See Pull Request #18
2012-11-01 17:41:49 +00:00
Philippe Rétornaz 898bd07810 cc253x: optionally push bits in p2 interrupt
See Pull Request #18
2012-11-01 17:41:46 +00:00
Philippe Rétornaz 0a6e65acdf cc2531: USB changes:
- usb cdc-acm:
  * implement get line coding
  * use printf only when debugging
  * Add events

- usb-core: do not force debugging

See Pull Request #18
2012-11-01 17:41:41 +00:00
George Oikonomou c1d72475d7 cc253x: Renamed P2 interrupt-related files for better consistency
See Pull Request #18
2012-11-01 17:41:38 +00:00
George Oikonomou c60f0b4349 cc253x: P2-related routines are now bankable
We keep the ISR in its own file and move everything else
to a different one, so that we only have to keep the ISR
in HOME

See Pull Request #18
2012-11-01 17:41:32 +00:00
George Oikonomou d9d4fa168d cc253x: Renamed the P2 ISR
This is mainly a naming convention thing, we want to have 'isr'
as part of the name, instead of 'int'. We also want port_2 instead
of p2 because we already had port_1

See Pull Request #18
2012-11-01 17:41:28 +00:00
George Oikonomou fea4970142 cc253x: Configurable linkage for the P2 ISR
See Pull Request #18
2012-11-01 17:41:24 +00:00
Philippe Rétornaz ba96408f37 cc253x: Add USB support to the compilation scripts
See Pull Request #18
2012-11-01 17:41:21 +00:00
Philippe Rétornaz d93fee612d cc2531: Add USB driver
See Pull Request #18
2012-11-01 17:41:17 +00:00
Philippe Rétornaz ddc8120d7c cc253x: Add p2 interrupt handler
The P2 Interrupt is shared across many periferal (I2C, USB, GPIO).
This adds a generic interrupt handler on which the differents drivers
can register a handler.

See Pull Request #18
2012-11-01 17:41:11 +00:00
Philippe Rétornaz dec34c21ef cc2531: change cdc-acm descriptor
Change to have a real usb VID/PID and better fit the capabilities
of the CC2531 hardware (enpoint size, location).

Compile only if the cdc-acm class is requested.

See Pull Request #18
2012-11-01 17:41:07 +00:00
Philippe Rétornaz 0e55eb0947 cc2531: Copy arm usb framework
See Pull Request #18
2012-11-01 17:40:35 +00:00
George Oikonomou 713c2e5974 DOS EOL and indentation fixes (core/ apps/ cpu/)
- Removed some DOS EOLs
- Changed some tabs to spaces
- Removed some trailing whitespaces

Part of Pull Request #6
2012-10-30 13:43:51 +00:00
Adam Dunkels 6c8fbd2dff Merge pull request #11 from adamdunkels/remove-rtl8019
Removed old unused RTL8019 code that had license issues
2012-10-29 08:43:59 -07:00
Adam Dunkels 1af22fa4fe Removed old unused RTL8019 code that had license issues 2012-10-29 16:08:09 +01:00
Mariano Alvira 4087c0785f remove -g
see http://comments.gmane.org/gmane.os.contiki.devel/13869
2012-10-29 10:34:28 -04: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
Niclas Finne f5c8cff5b2 Made MT stack size configurable 2012-10-23 00:52:52 +02:00
George Oikonomou d84a97103f cc2x3x stack debugging macro fix 2012-09-20 15:12:02 +01:00
George Oikonomou fde1510653 Added definitions for cc2530 DMA-related SFR bits 2012-09-20 15:09:15 +01:00
George Oikonomou 3b0e92168b Copied cc2530 stack functions to the cc2430 port 2012-09-20 15:09:15 +01:00
George Oikonomou 95b9d4ee29 Sensinode/cc2430 stack depth optimisation
This replicates the method used by the cc2530 port
2012-09-20 15:09:15 +01:00
George Oikonomou cb168da729 Changed the cc2430 sleep_flag to uint8_t 2012-09-20 15:09:15 +01:00
George Oikonomou fa5a38666b Removed redundant #else blocks 2012-09-20 15:09:15 +01:00
George Oikonomou 88c6689e38 cc2430: Build with --fomit-frame-pointer 2012-09-20 15:09:15 +01:00
Niclas Finne 767e8bb551 Default value for _DATA20_HEAP_SIZE when using the IAR compiler on MSP430 platforms 2012-09-20 14:01:56 +02:00
Niclas Finne 4630945475 Made the stack and heap size configurable when using the IAR compiler on the MSP430 platforms 2012-09-19 22:49:19 +02:00
George Oikonomou ee7af77ca9 Reworked the cc2530 stack debugging facilities:
- Moved to their own file
  (so we can later copy the entire thing over to cc2430)
- Renamed the functions
  (for naming convention reasons)
- The entire thing can be enabled/disabled
- Added a couple more macros
- Hooked into main()
2012-09-07 17:40:17 +01:00
Philippe Rétornaz 9a63e8c027 cc253x: Add stack monitoring helpers 2012-09-07 17:32:54 +01:00
Philippe Rétornaz 48d99f15c8 cc253x: fix dma interrupt enable flag 2012-09-07 17:32:54 +01:00
George Oikonomou c6ec22c4c8 cc2530: Added a method to maximise stack depth
This was oringinally contributed/reported/discussed/patched by
Philippe Retornaz (EPFL) but it's implemented
in a more configurable fashion here.
2012-09-07 17:32:53 +01:00
Philippe Rétornaz 666ff6ca55 cc253x: use a uint8_t for sleep_flag
__bit variables must be located after the 0x20 address
This force the stack to start after 0x20, thus decrease
the stack size by a considerable amount.
2012-09-07 17:32:10 +01:00