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 - jpa

Pages: [1]
1
More problems switching from the simulator to the 52233DEMO target...

I figured out that while the Visual C environment adds new files to the build, the Makefile used for GCC is NOT updated, so my tasks weren't getting compiled in.  (Funny, no linker errors that I could see).  Fixed that, and can see my task functions in the map file. 

Still, I can't get a simple task that prints a debug message to the serial port to work.  The original demo's debugging messages make it there just fine.  My task starts up fine and also prints to the serial port when running under the simulator. 

I'm sure it's something stupid, but would appreciate any pointers, please.

Task just calls fnDebugMsg("Init is running.\r\n"); and returns.
config is "MEDIUM_QUE", (DELAY_LIMIT) ((5*SEC) + (PHY_POWERUP_DELAY)), 0, UTASKER_STOP

John

2
This may be a silly question, but is there a valid reason why USE_SMTP must be defined to use buffered TCP?

Running under the simulator, configured for 52233DEMO...

My uTasker TCP client connects fine with it defined, but with it commented out, the client never sends any packets to connect to the server (based on WireShark).  HTTP and FTP can be commented out without any problems. 

I thought it might be a problem with the parameters file, so I renamed Simulator\FLASH_M5223X.ini, fixed some of the defaults, and still it wouldn't talk.  Uncommented USE_SMTP and rebuilt and it works again. 

JPA

3
µTasker general / TCP client send
« on: April 19, 2011, 10:55:57 PM »
(Should I be adding to the pinned TCP topic?)

I'm trying to create a TCP client and send data.  I can connect, and the first packet gets through, but then the second packet is tagged as "TCP Out-of-Order" by Wireshark and is apparently not received by the server.  The basic intention is to make what is essentially a serial-to-ethernet converter.  The serial receive routines gather together a whole message and call "as_send" below.  It is NOT called from the callback function since it's not being sent as the response to a server message.  Is that the key?  The callback function is the fnTestListener from your TCP thread except the TCP_EVENT_DATA case just prints out the fact that data has been received (so then it falls through and returns APP_ACCEPT).

I've attached the Wireshark log... uTasker client is 192.168.1.10 trying to send a 32 byte packet to 192.168.1.4.

JPA

Code: [Select]
typedef struct stTCP_MESSAGE
{
    TCP_HEADER     tTCP_Header;     // reserve header space
    PACKET_TYPE   packet;
} TCP_MESSAGE;

//=============================================================================
int as_send(int as_index, const void *msg, size_t len, int flags)
{
unsigned int i;
TCP_MESSAGE test_message;

uMemcpy(&test_message.packet, msg, sizeof(PACKET_TYPE));
if (fnSendTCP(test_client_socket, (unsigned char *) &test_message.tTCP_Header, sizeof(PACKET_TYPE), TCP_FLAG_PUSH) > 0) {
fnDebugMsg("sent ok?\r\n");
        return 0;
}
else
return 0;
}

4
NXPTM M522XX, KINETIS and i.MX RT / Sourcery and M52233DEMO
« on: April 08, 2011, 09:36:52 PM »
Are there linker scripts available somewhere for Sourcery G++ and the M52233DEMO board?

Anything else that needs to be done to get it running?  Flashed the pre-built image in and everything's great.  Simulation is great.  GCC build...not so much. 

Got the code to compile and link, flashed it...nothing.  Suddenly sometime later it seems to have sprung to life after something timed out. 

John

Pages: [1]