Merge pull request #1448 from bthebaudeau/cc2538-fix-build-issues

cc2538: Fix build issues
This commit is contained in:
Benoît Thébaudeau 2016-01-09 16:37:30 +01:00
commit 435d9a71c1
13 changed files with 32 additions and 29 deletions

View File

@ -50,12 +50,12 @@
* bignum_divide_start bignum_divide_get_result (division) * bignum_divide_start bignum_divide_get_result (division)
* bignum_cmp_start bignum_cmp_get_result (comparison) * bignum_cmp_start bignum_cmp_get_result (comparison)
*/ */
#include "bignum-driver.h" #include "dev/bignum-driver.h"
#include "stdio.h" #include <stdio.h>
#include "reg.h" #include "reg.h"
#include "nvic.h" #include "dev/nvic.h"
#define ASSERT(IF) if(!(IF)) { return PKA_STATUS_INVALID_PARAM; } #define ASSERT(IF) if(!(IF)) { return PKA_STATUS_INVALID_PARAM; }

View File

@ -59,7 +59,7 @@
#define BIGNUM_DRIVER_H_ #define BIGNUM_DRIVER_H_
#include "contiki.h" #include "contiki.h"
#include "pka.h" #include "dev/pka.h"
#include <stdint.h> #include <stdint.h>

View File

@ -35,15 +35,15 @@
* \file * \file
* Implementation of the cc2538 ECC Algorithms * Implementation of the cc2538 ECC Algorithms
*/ */
#include <contiki.h> #include "contiki.h"
#include <process.h> #include "sys/process.h"
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
#include "ecc-algorithm.h" #include "dev/ecc-algorithm.h"
#include "ecc-driver.h" #include "dev/ecc-driver.h"
#include "pka.h" #include "dev/pka.h"
#define CHECK_RESULT(...) \ #define CHECK_RESULT(...) \
state->result = __VA_ARGS__; \ state->result = __VA_ARGS__; \

View File

@ -49,8 +49,8 @@
#ifndef ECC_ALGORITHM_H_ #ifndef ECC_ALGORITHM_H_
#define ECC_ALGORITHM_H_ #define ECC_ALGORITHM_H_
#include "bignum-driver.h" #include "dev/bignum-driver.h"
#include "ecc-driver.h" #include "dev/ecc-driver.h"
typedef struct { typedef struct {
/* Containers for the State */ /* Containers for the State */

View File

@ -32,8 +32,8 @@
* \addtogroup c2538-ecc-curves * \addtogroup c2538-ecc-curves
* @{ * @{
*/ */
#include <contiki.h> #include "contiki.h"
#include <ecc-driver.h> #include "dev/ecc-driver.h"
/* [NIST P-256, X9.62 prime256v1] */ /* [NIST P-256, X9.62 prime256v1] */
static const uint32_t nist_p_256_p[8] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, static const uint32_t nist_p_256_p[8] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000,

View File

@ -39,7 +39,7 @@
* \file * \file
* Implementation of the cc2538 ECC driver * Implementation of the cc2538 ECC driver
*/ */
#include "ecc-driver.h" #include "dev/ecc-driver.h"
#include "reg.h" #include "reg.h"
#include "dev/nvic.h" #include "dev/nvic.h"

View File

@ -48,7 +48,7 @@
#define ECC_DRIVER_H_ #define ECC_DRIVER_H_
#include "contiki.h" #include "contiki.h"
#include "pka.h" #include "dev/pka.h"
#include <stdint.h> #include <stdint.h>
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -56,7 +56,7 @@ static volatile struct channel_ctrl channel_config[UDMA_CONF_MAX_CHANNEL + 1]
void void
udma_init() udma_init()
{ {
memset(&channel_config, 0, sizeof(channel_config)); memset((void *)&channel_config, 0, sizeof(channel_config));
REG(UDMA_CFG) = UDMA_CFG_MASTEN; REG(UDMA_CFG) = UDMA_CFG_MASTEN;

View File

@ -0,0 +1 @@
TARGET = cc2538dk

View File

@ -45,11 +45,11 @@
* Example demonstrating ECDH on the cc2538dk platform * Example demonstrating ECDH on the cc2538dk platform
*/ */
#include "contiki.h" #include "contiki.h"
#include "ecc-algorithm.h" #include "dev/ecc-algorithm.h"
#include "ecc-curve.h" #include "dev/ecc-curve.h"
#include "random.h" #include "lib/random.h"
#include "rtimer.h" #include "sys/rtimer.h"
#include "pt.h" #include "sys/pt.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -45,10 +45,10 @@
* Example demonstrating ECDSA-Sign on the cc2538dk platform * Example demonstrating ECDSA-Sign on the cc2538dk platform
*/ */
#include "contiki.h" #include "contiki.h"
#include "ecc-algorithm.h" #include "dev/ecc-algorithm.h"
#include "ecc-curve.h" #include "dev/ecc-curve.h"
#include "rtimer.h" #include "sys/rtimer.h"
#include "pt.h" #include "sys/pt.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -45,10 +45,10 @@
* Example demonstrating ECDSA-Verify on the cc2538dk platform * Example demonstrating ECDSA-Verify on the cc2538dk platform
*/ */
#include "contiki.h" #include "contiki.h"
#include "ecc-algorithm.h" #include "dev/ecc-algorithm.h"
#include "ecc-curve.h" #include "dev/ecc-curve.h"
#include "rtimer.h" #include "sys/rtimer.h"
#include "pt.h" #include "sys/pt.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -17,6 +17,8 @@ cc2538dk/cc2538dk \
cc2538dk/udp-ipv6-echo-server/cc2538dk \ cc2538dk/udp-ipv6-echo-server/cc2538dk \
cc2538dk/sniffer/cc2538dk \ cc2538dk/sniffer/cc2538dk \
cc2538dk/mqtt-demo/cc2538dk \ cc2538dk/mqtt-demo/cc2538dk \
cc2538dk/crypto/cc2538dk \
cc2538dk/pka/cc2538dk \
ipv6/multicast/cc2538dk \ ipv6/multicast/cc2538dk \
zolertia/zoul/zoul \ zolertia/zoul/zoul \
zolertia/zoul/cc1200-demo/zoul \ zolertia/zoul/cc1200-demo/zoul \