Skip to content

Commit

Permalink
FW-887 fix compile issues and update openmote-b, openmote_cc2538 oos_…
Browse files Browse the repository at this point in the history
…openwsn project
  • Loading branch information
christianhopfner committed Nov 12, 2020
1 parent e2958a0 commit fd955ba
Show file tree
Hide file tree
Showing 10 changed files with 5,926 additions and 5,322 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ settings
/projects/telosb/01bsp_uart/path.txt
/projects/telosb/03oos_macpong/path.txt
/projects/telosb/02drv_opentimers/path.txt

Exe
Obj
List
*.ewt
2 changes: 2 additions & 0 deletions bsp/boards/python/openwsnmodule_obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ struct OpenMote {
icmpv6rpl_vars_t icmpv6rpl_vars;
// l3
monitor_expiration_vars_t monitor_expiration_vars;
#if OPENWSN_6LO_FRAGMENTATION_C
frag_vars_t frag_vars;
#endif
// l2b
sixtop_vars_t sixtop_vars;
neighbors_vars_t neighbors_vars;
Expand Down
6 changes: 5 additions & 1 deletion openstack/03a-IPHC/frag.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "config.h"

#if OPENWSN_6LO_FRAGMENTATION_C

#include "opendefs.h"
#include "openqueue.h"
#include "opentimers.h"
Expand Down Expand Up @@ -102,7 +104,7 @@ typedef struct {



//=========================== variables =======================================
//=========================== variables =======================================

//=========================== prototypes ======================================

Expand All @@ -114,4 +116,6 @@ void frag_receive(OpenQueueEntry_t *msg);

owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg);

#endif /* OPENWSN_6LO_FRAGMENTATION_C */

#endif /* OPENWSN_FRAG_H */
5 changes: 3 additions & 2 deletions openstack/03a-IPHC/iphc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "neighbors.h"
#include "openbridge.h"
#include "icmpv6rpl.h"
#include "openqueue.h"

//=========================== variables =======================================

Expand Down Expand Up @@ -145,7 +146,7 @@ owerror_t iphc_sendFromForwarding(
return E_FAIL;
}
*((uint8_t * )(msg->payload)) = IPECAP_6LOTH_TYPE;
// length
// length
if (packetfunctions_reserveHeader(&msg, sizeof(uint8_t)) == E_FAIL) {
return E_FAIL;
}
Expand Down Expand Up @@ -1221,7 +1222,7 @@ uint8_t iphc_retrieveIPv6HopByHopHeader(OpenQueueEntry_t *msg, rpl_option_ht *rp
\param[in,out] msg The message to retrieve the header from.
\param[in] deadline_msg_ptr Pointer to the Deadline header.
\param[out] deadline_option Pointer to the structure to hold the retrieved Deadline option
\param[out] deadline_option Pointer to the structure to hold the retrieved Deadline option
*/
void iphc_retrieveIPv6DeadlineHeader(
OpenQueueEntry_t *msg,
Expand Down
58 changes: 58 additions & 0 deletions openstack/04-TRAN/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,64 @@

sock_udp_t* udp_socket_list;

#if (__ICCARM__)
// IAR's errno.h apparently doesn't define EOVERFLOW.
#ifndef EOVERFLOW
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define EOVERFLOW 1
#endif

// IAR's errno.h apparently doesn't define EINVAL.
#ifndef EINVAL
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define EINVAL 1
#endif

// IAR's errno.h apparently doesn't define ENOMEM.
#ifndef ENOMEM
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define ENOMEM 1
#endif

// IAR's errno.h apparently doesn't define EAFNOSUPPORT.
#ifndef EAFNOSUPPORT
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define EAFNOSUPPORT 1
#endif

// IAR's errno.h apparently doesn't define EADDRINUSE.
#ifndef EADDRINUSE
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define EADDRINUSE 1
#endif

// IAR's errno.h apparently doesn't define ENOTCONN.
#ifndef ENOTCONN
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define ENOTCONN 1
#endif

// IAR's errno.h apparently doesn't define ENOBUFS.
#ifndef ENOBUFS
// There is no real good choice for what to set
// errno to in this case, so we just pick the
// value '1' somewhat arbitrarily.
#define ENOBUFS 1
#endif
#endif //(__ICCARM__)

// =========================== variables =======================================
// =========================== prototypes ======================================

Expand Down
5 changes: 0 additions & 5 deletions openstack/04-TRAN/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ struct _sock_tl_ep {
*/
typedef struct _sock_tl_ep sock_udp_ep_t;

/**
* @brief Type for a UDP sock object
*/
typedef struct sock_udp sock_udp_t;

/**
* @brief Initialize the internal UDP socket structures
*/
Expand Down
8 changes: 4 additions & 4 deletions openweb/opencoap/oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define EAAD_MAX_LEN 9 + OSCOAP_MAX_ID_LEN // assumes no Class I options
#define AAD_MAX_LEN 12 + EAAD_MAX_LEN
#define INFO_MAX_LEN 2 * OSCOAP_MAX_ID_LEN + 2 + 1 + 4 + 1 + 3
#define INFO_MAX_LEN 2 * OSCOAP_MAX_ID_LEN + 2 + 1 + 4 + 1 + 3

//=========================== variables =======================================

Expand Down Expand Up @@ -420,7 +420,7 @@ owerror_t oscore_parse_compressed_COSE(uint8_t *buffer,
uint8_t **kid,
uint8_t *kidLen)
{
uint8_t tmp[0];
uint8_t tmp;
uint8_t *ptr;
uint8_t index;
uint8_t n;
Expand All @@ -429,8 +429,8 @@ owerror_t oscore_parse_compressed_COSE(uint8_t *buffer,
uint8_t reserved;

if (bufferLen == 0) {
tmp[0] = 0x00;
ptr = tmp;
tmp = 0x00;
ptr = &tmp;
bufferLen = 1;
} else {
ptr = buffer;
Expand Down
Loading

0 comments on commit fd955ba

Please sign in to comment.