Hi 

am Anush doing my PG project work.

i want to simulate the make pc so that i can run tinyviz. while doing that i
too facing same problem of redefinition of `uint8_t'; hope you have solved
the problem will you be able to help me to move forward from this point by
informing about the correction that i can build successfully.

Expecting you for replay.

Thank You

Regards

Anush




VJ shekar wrote:
> 
> Hello all,
> Iam trying to compile blink in tinyos-1.x, but its strange to see the
> following error.
> I haven't faced this error before.
> 
> VJ@Vijay /cygdrive/c/tinyos/cygwin/opt/tinyos-1.x/apps/blink
> $ make pc
>     compiling Blink to a pc binary
> ncc -o build/pc/main.exe -g -O0 -board=micasb -pthread -target=pc  -Wall
> -Wshado
> w -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -fnesc-nido-tosnodes=1000
> -fnesc-cfile=buil
> d/pc/app.c  Blink.nc -lm
> /opt/tinyos-1.x/tos/system/tos.h:57: redefinition of `uint8_t'
> /usr/include/stdint.h:24: previous declaration of `uint8_t'
> /opt/tinyos-1.x/tos/system/tos.h:62: redefinition of `uint16_t'
> /usr/include/stdint.h:25: previous declaration of `uint16_t'
> In file included from /opt/tinyos-1.x/tos/platform/pc/hardware.h:43,
>                  from /opt/tinyos-1.x/tos/system/tos.h:132:
> */opt/tinyos-1.x/tos/platform/pc/nido.h:63: `TOSH_NUM_NODES' undeclared
> here
> (not
>  in a function)
> /opt/tinyos-1.x/tos/platform/pc/nido.h:63: enumerator value for `TOSNODES'
> not i
> nteger constant
> make: *** [build/pc/main.exe] Error 1*
> **
> And my nido.h file looks like this with the 63rd line highlighted below.
> 
> #ifndef NIDO_H_INCLUDED
> #define NIDO_H_INCLUDED
> 
> /* in nesc/nesc-cpp.c, the TOSH_NUM_NODES macro is defined, so that
>    TOSNODES is set to the value specified to the nesc compiler by the flag
>    "-fnesc-nido-tosnodes=___" */
> enum {
>  * TOSNODES = TOSH_NUM_NODES,
> *  DEFAULT_EEPROM_SIZE = (512 * 1024)  // 512 KB
> };
> #include "event_queue.h"
> #include "adjacency_list.h"
> #include "rfm_model.h"
> #include "adc_model.h"
> #include "spatial_model.h"
> #include "nido_eeprom.h"
> #include "events.h"
> #include <sys/time.h>
> typedef struct TOS_node_state{
>   long long time; // Time at which mote booted
>   int pot_setting;
> } TOS_node_state_t;
> typedef struct TOS_state {
>   long long tos_time;
>   int radio_kb_rate;
>   short num_nodes;
>   short current_node;
>   TOS_node_state_t node_state[TOSNODES];
>   event_queue_t queue;
>   rfm_model* rfm;
>   adc_model* adc;
>   spatial_model* space;
>   bool moteOn[TOSNODES];
>   /* Synchronization */
>   bool paused;
>   pthread_mutex_t pause_lock;
>   pthread_cond_t pause_cond;
>   pthread_cond_t pause_ack_cond;
> } TOS_state_t;
> #define NODE_NUM (tos_state.current_node)
> #define THIS_NODE (tos_state.node_state[tos_state.current_node])
> #define TOS_queue_insert_event(event) \
>         queue_insert_event(&(tos_state.queue), event);
> extern TOS_state_t tos_state;
> int notifyTaskPosted(char* name);
> int notifyEventSignaled(char* name);
> int notifyCommandCalled(char* name);
> static void __nesc_nido_initialise(int mote);
> #include "dbg_modes.h"
> static void dbg_clear(TOS_dbg_mode mode, const char *format, ...);
> /* This function is here because it uses function pointers */
> void tos_state_model_init(void)
> {
>   dbg_clear(DBG_SIM|DBG_BOOT, "SIM: spatial model initialized.\n");
>   tos_state.space->init();
> 
>   dbg_clear(DBG_SIM|DBG_BOOT, "SIM: RFM model initialized at %i
> kbit/sec.\n", tos_state.radio_kb_rate);
>   tos_state.rfm->init();
> 
>   dbg_clear(DBG_SIM|DBG_BOOT, "SIM: ADC model initialized.\n");
>   tos_state.adc->init();
> }
> #endif
> 
> 
> Actually, im switching back from tinyos-2.x to tinyos-1.x.
> All the required environmental variables are set proparly as mentioned in
> the tutorials.
> Well, i have seen the same problem too in the previous posts, but that is
> related to cricket software and it is of no help to me.
> Could anyone please suggest me how to get over with this Error.
> Thanks a lot in advance.
> 
> Vijay.
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 

-- 
View this message in context: 
http://old.nabble.com/enumerator-problem-in-tinyos-1.x-at-compilation-tp17199797p32119972.html
Sent from the TinyOS - Help mailing list archive at Nabble.com.

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to