Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Tino

Pages: [1]
1
ATMELTM AT91SAM7X and AVR32 / Error with Windows Simulator
« on: January 15, 2008, 11:47:40 PM »
I use the ethernet example exactly as in the tutorial.

if ((TCP_data_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, TCP_DEFAULT_TIMEOUT, fnDataListener)) >= 0) {
         fnTCP_Listen(TCP_data_socket, DATA_PORT_NUMBER, 0);
      }


static int fnDataListener(USOCKET Socket, unsigned char ucEvent, unsigned char *ucIp_Data, unsigned short usPortLen) {
   unsigned char ucTestData[10] = {0,1,2,3,4,5,6,7,8,9};
   switch (ucEvent) {
      case TCP_EVENT_CONNECTED:   // Connection has been established
         if (fnSendTCP(TCP_data_socket, ucTestData, 9, TCP_FLAG_PUSH) > 0) {
            return APP_SENT_DATA;
         }
break;
...
return APP_ACCEPT;   //Standard reply which accepts
}

When I call the port with my webbrowser the VS throws an exception
"Run-Time Check Failure #2 - Stack around the variable 'ucTestData' was corrupted.".

When I changed the datatype of ucTestData to unsigned short or int or something, it doesn't crash. But the received data is trash.

2
ATMELTM AT91SAM7X and AVR32 / SP2 - Problems with CAN
« on: January 15, 2008, 01:42:10 PM »
Hi!

I try to compile SP2 with CAN_INTERFACE enabled.

In VS I get the following errors:
Error   1   error LNK2019: unresolved external symbol _fnCAN_get_rx referenced in function _entry_can   can_drv.obj   

Error   2   error LNK2019: unresolved external symbol _fnCAN_tx referenced in function _entry_can   can_drv.obj   

Error   3   error LNK2019: unresolved external symbol _fnConfigCAN referenced in function _fnOpenCAN   can_drv.obj   

Error   4   error LNK2019: unresolved external symbol _fnInitCAN referenced in function _fnOpenCAN   can_drv.obj   


The makefile gives the following errors:
Build\Driver.o: In function `fnOpen':
..\..\..\uTasker/Driver.c:160: undefined reference to `fnOpenCAN'


I tried to resolve it but had no luck.
Please help :)

Pages: [1]