Commit Graph

9886 Commits

Author SHA1 Message Date
George Oikonomou
2ab6355415 Merge pull request #662 from g-oikonomou/travis-url-fix
Fix Travis failure
2014-04-26 14:44:39 +01:00
George Oikonomou
78e13a936a Fix Travis failure
For travis tests, we host pre-built bundles of the arm-gcc and sdcc
toolchains on github, and we download them with curl

Apparently, the URL for those bundles has been changed and the
HTTP response is a 301 redirect. curl doesn't follow it

We change .travis.yml to pull the bundles form the new location
2014-04-26 14:06:53 +01:00
George Oikonomou
08c884afa0 Improve the CC2538 extended RF API implementation
* Decouple 64-bit address from LINKADDR_SIZE
* get and set object from/to the start/end of the src/dest buffer
* We expect size == 8 (rather than size < 8) for both get_ and set_object. Error otherwise
* The RF no longer sets parameters by itself. We let the platform do this, using the extended API.
2014-04-23 12:20:16 +01:00
George Oikonomou
49b6ad2af5 Use the extended RF API for the cc2530 border router example 2014-04-23 12:16:50 +01:00
George Oikonomou
6028c0765f Don't hardcode min and max TX power values 2014-04-23 12:16:50 +01:00
George Oikonomou
3183805ba4 Implement extended RF API for the CC2530 RF 2014-04-23 12:16:50 +01:00
George Oikonomou
df81cbaed9 Simplify the extended RF API example 2014-04-22 19:42:47 +01:00
Atis Elsts
7dcfe77fba Fix inconsistent usage of short/long integer type in mbxxx platform's configuration file.
The type used to store rtimer ticks on this platform is 32-bit integer, but the macro uses 16-bit comparison.
As a result, the output of the RTIMER_CLOCK_LT(a,b) macro was incorrect when used for comparisons between time values with sufficiently large difference.
The code to repeat this problem on mbxxx platform:

  rtimer_clock_t a = 6 * RTIMER_ARCH_SECOND;
  rtimer_clock_t b = 0;
  printf("%d\n", RTIMER_CLOCK_LT(a,b)); // expected output: "0", actual: "1"
2014-04-22 14:52:50 +02:00
Atis Elsts
9cbfede2b6 Explicitly initialize queue buffer in the main startup routine only if uIP is used.
The Rime stack already does this on its own, and there is no need to do it twice.
2014-04-22 14:40:04 +02:00
Atis Elsts
b9e15a5986 Make native platform's main loop less noisy. 2014-04-22 14:38:08 +02:00
Atis Elsts
6ea744421b Initialize the rtimer component on native platform's startup.
Otherwise applications that use rtimers die when run as native code because of an unhandled signal.
2014-04-22 14:35:01 +02:00
Ian Martin
ee05810904 Changes suggested by @bthebaudeau. 2014-04-18 10:29:47 -04:00
Laurent Deru
3b503da680 Add user configuration of DIO preference field 2014-04-18 16:26:23 +02:00
Laurent Deru
3fb0d69be6 Remove duplicated configuration parameters definition 2014-04-18 15:37:31 +02:00
George Oikonomou
b0f1199202 Merge pull request #636 from g-oikonomou/fix-random-init-lockup
Fix CC2538 random_init lockup
2014-04-18 13:28:40 +01:00
Jens Dede
446208dc1c Merge branch 'master' of git://github.com/contiki-os/contiki into ds6_period_configurable 2014-04-18 13:33:01 +02:00
Jens Dede
96a70f9ab0 Rename as suggested by g-oikonomou 2014-04-18 13:32:40 +02:00
Laurent Deru
79537a6dd7 rpl_select_parent: Only check parents belonging to the given dag 2014-04-18 11:39:33 +02:00
George Oikonomou
49bf7cc241 Merge pull request #616 from hexluthor/listing
CC2538: Add a Makefile rule to generate a final assembly listing.
2014-04-17 22:13:52 +01:00
George Oikonomou
d34ee59e97 Merge pull request #623 from ADVANSEE/cc2538-multi-uart
cc2538: uart: Make it possible to use several UARTs simultaneously
2014-04-17 20:20:08 +01:00
Benoît Thébaudeau
d93d129da6 cc2538: uart: Make it possible to use several UARTs simultaneously
This avoids the limitation of having a single UART available at runtime, without
duplicating code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-04-17 18:53:44 +02:00
Ian Martin
2cf730a1c6 Un-indent preprocessor directives. 2014-04-17 10:39:00 -04:00
George Oikonomou
db754a57d7 Merge pull request #598 from lab11/spi-flush2
[SPI + CC2538] Update the SPI driver for CC2538
2014-04-16 22:42:53 +01:00
Ian Martin
23a3a7f004 Add a note about "make cc2538-demo.lst" to the platform README. 2014-04-16 10:47:01 -04:00
Ian Martin
16936d864c Rename FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PIN to FLASH_CCA_CONF_BOOTLDR_BACKDOOR_PORT_A_PIN. 2014-04-16 10:19:37 -04:00
Ian Martin
1a63c47cf9 CC2538: Add CONF parameters to select boot loader backdoor pin and logic level. 2014-04-15 17:36:55 -04:00
Niclas Finne
ceb868d934 Modified project setup for er-rest-example and rest-example to use
nullrdc and nullmac to reduce the code size. This allows the examples
to compile on Tmote Sky again.
2014-04-15 22:59:20 +02:00
Niclas Finne
0327623ae1 Minor update to improve output in extended RF API example. On 16 bit
platforms, PAN id and short address might be negative when used as
16 bit signed integers.
2014-04-15 22:50:11 +02:00
Brad Campbell
af27d2d252 [CC2538-SPI] Implement SPI_FLUSH, spi mode, !CS
Because the CC2538 has a multi-byte SPI RX FIFO, flushing the buffer
requires more than just a single read. This adds a loop that empties the
entire RX buffer on a FLUSH().

Different SPI chips needs different SPI settings. This commit adds a
function that allows chip drivers to configure the SPI peripheral before
using it.

The frame pin the driver was using as a chip select does not work as
most devices expect it to. It toggles after every byte, and most chips
interpret that as end of message. To make drivers more reliable, each
chip driver should setup a GPIO and assert it as needed.
2014-04-15 14:07:10 -04:00
Brad Campbell
a96dc90250 [SPI] Make SPI_FLUSH() more versatile
Currently the SPI driver in core/ sets `SPI_FLUSH()` to be a single read
of the spi RX buffer. This is fine for many microcontrollers, but newer
platforms like the CC2538 have a multi-byte FIFO for the RX buffer. In
that case, a single read is not guaranteed to flush the RX. This commit
allows `SPI_FLUSH()` to be platform dependent if needed, but doesn't
change for platforms where it works.
2014-04-15 14:04:42 -04:00
Fredrik Österlind
d3b9954342 Merge pull request #639 from ejoerns/pull-req/cooja-plugin-pos
[Cooja] Set location of newly created plugins relative to second last activated plugin
2014-04-15 09:51:29 +02:00
Fredrik Österlind
3a08f77489 Merge pull request #640 from ejoerns/pull-req/cooja-loglistener-fix
[Cooja] plugins/LogListener: Prevent from throwing ArrayIndexOutOfBoundsException
2014-04-15 09:09:39 +02:00
Enrico Joerns
055c70b455 [cooja] Set location of newly created plugins relative to second last activated plugin.
Setting the position based on the number
of total inner frames was very inflexible
and caused pad positioning for larger number
of frames.

Setting the location of new plugin frames
to the second last activated one tries to
meet two requirements:
- Avoid covering the last activated plugin frame,
i.e. the one that was active when new plugin
start was invoked.
- Set new plugin near an actively used desktop pane
location and allow 'diagonal stacking'
2014-04-15 00:48:52 +02:00
Enrico Joerns
b53cee163d [cooja] plugins/LogListener: Prevent from throwing
ArrayIndexOutOfBoundsException in case of empty logTable
2014-04-15 00:22:24 +02:00
Nicolas Tsiftes
19cd33664d Merge pull request #633 from nfi/verbosity-control-msp430
Add support for verbosity control for building MSP430-based platforms with the IAR compiler.
2014-04-14 16:38:07 +02:00
Nicolas Tsiftes
ce2ed95b93 Merge pull request #585 from g-oikonomou/generic-icmp6-in-hooks
Generic ICMPv6 input hooks
2014-04-14 16:12:10 +02:00
George Oikonomou
22800de94e Add extended RF API example 2014-04-14 15:25:32 +02:00
George Oikonomou
0ec1eda75e Implement extended RF API for the CC2538 2014-04-14 15:25:30 +02:00
Niclas Finne
132b8dde3b Fixed CC2420 to return RADIO_RESULT_INVALID_VALUE if trying to set a
transmission power outside the valid range instead of using closest
valid value.
2014-04-13 21:43:37 +02:00
Niclas Finne
f0c48c55ca Fixed STM32W radio to return RADIO_RESULT_INVALID_VALUE if trying to
set a transmission power outside the valid range instead of using
closest valid value.
2014-04-13 21:36:45 +02:00
George Oikonomou
602f834caf Merge pull request #472 from ADVANSEE/cc2538-clock-adjust-etimer-poll
cc2538: clock: Fix clock / timer issues with PM1/2
2014-04-13 16:35:17 +01:00
George Oikonomou
eed1352282 Fix CC2538 random_init lockup
Contiki sometimes fails to boot correctly and locks up in
random_init()

This problem only manifests itself for specific versions
of the arm-gcc toolchain and then again only for specific
levels of optimisation (-Os vs -O2, depending on the
value of the SMALL make variable)

The lockup is caused when we write an RFCORE XREG before
the RF clock ungating has taken effect, which in turn
only occurs depending on the assembly generated for those
two instructions:

  REG(SYS_CTRL_RCGCRFC) = 1;

  REG(RFCORE_XREG_FRMCTRL0) = 0x00000008;

This commit makes the RNG wait for the ungating to take
effect before attempting to write the register
2014-04-13 14:38:00 +01:00
George Oikonomou
33abe26ec8 Merge pull request #411 from ADVANSEE/cc2538-adc
cc2538: Add adc driver and example
2014-04-13 03:05:12 +01:00
George Oikonomou
22554e6d72 Merge pull request #596 from hexluthor/cc2538-uart-baudrate
cc2538: Support any UART baudrate.
2014-04-13 02:51:58 +01:00
Niclas Finne
757950f87f Set the RAM and flash size based on the CPU configuration for STM32W 2014-04-11 17:41:09 +02:00
Niclas Finne
0122373fdc OBJECTDIR is defined by Makefile.include 2014-04-11 17:41:08 +02:00
Niclas Finne
4e7abb09c2 Support verbosity control when building for STM32W-based platforms 2014-04-11 17:41:06 +02:00
Niclas Finne
2c953c3346 Support verbosity control when building MSP430-based platforms with
the IAR compiler.
2014-04-11 17:36:42 +02:00
Niclas Finne
b1335b08a8 Changed to use LINKADDR_SIZE instead of sizeof() to select between
short address and long address as some platforms might use padding in
the struct. This fixes #555.
2014-04-11 17:24:16 +02:00
Niclas Finne
68730566a3 Added method to framer that returns the header length if the framer
would create a header with the current packet information.

This allows sicslowpan to calculate the max payload size without
consuming a sequence number or clearing/restoring the packet buffer.
2014-04-11 17:03:23 +02:00