Build error ATSAM4E

boble wrote on Tuesday, November 07, 2017:

Hi,

I have a ATSAM4E Xplained Pro and wanted to try the http server.

When i try to build the code I get the following error:
Severity Code Description Project File Line
Error recipe for target ‘src/ASF/common/services/delay/sam/cycle_counter.o’ failed RTOSDemo \160919_FreeRTOS_Labs\FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_and_FAT_ATSAM4E\Debug\Makefile 792

Error ‘s’ undeclared here (not in a function) RTOSDemo \160919_FreeRTOS_Labs\FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_and_FAT_ATSAM4E\src\ASF\common\services\delay\sam\cycle_counter.c 53

I’m running the latest version of ASF Atmel Studio 7 (Version: 7.0.1645 - )

Do you have any idea what i can try to fix it?

rtel wrote on Tuesday, November 07, 2017:

I just tried and got the same error. It looks like an error in the ASF
to me. Just removing the line attribute((optimize(s))) fixed the
problem.

boble wrote on Tuesday, November 07, 2017:

that fixed the building error but i can’t connect i got a ip adres and everything but can’t see the webpage or connect to the ftp server

Status: Resolving address of RTOSDemo
Status: Connecting to 192.168.1.159:21…
Error: Connection timed out after 20 seconds of inactivity
Error: Could not connect to server

pinging the server works but http and ftp not

rtel wrote on Tuesday, November 07, 2017:

When you say you got an IP address, was that via DHCP?
Are you able to ping the device?

boble wrote on Tuesday, November 07, 2017:

Yes via DHCP I can also see it in the devices list of my router.
Yes when I ping the device I get a response.

boble wrote on Wednesday, November 08, 2017:

Yes via DHCP I can also see it in the devices list of my router.
Yes when I ping the device I get a response.

rtel wrote on Wednesday, November 08, 2017:

Could be a file access problem then. Have you verified the SD card by inserting into a laptop and viewing the files it contains?

boble wrote on Sunday, November 12, 2017:

Ah I thought it was also possible to use the 2GB of flash,shame that is not possible.

heinbali01 wrote on Monday, November 13, 2017:

Ah I thought it was also possible to use the 2GB of flash,shame that is not possible.

Why would that not be possible?
FreeRTOS+FAT should work properly with SD-cards of all sizes up to 16 GB.
I have not tried 32 and 64 GB cards yet.
Maybe other users have tried th larger cards?

The type of card should either be normal SD (SDSC) or SDHC.

Yes via DHCP I can also see it in the devices list of my router.
Yes when I ping the device I get a response.

So the basic communication is there.
Have you got further with this?

Have you tried the simpler tests like echo-client or -server?

Is your device sending logging? Either UDP logging ( UDPLoggingPrintf.c ), or serial?
I would be curious to see if all socket could be created and bound. And also if the necessary buffers were be created.
Is your application calling FreeRTOS_TCPServerWork()?

Have you run WireSharkl while trying to connect to either the FTP or HTTP server?

Regards.

boble wrote on Monday, November 13, 2017:

I mean in the default code, but the http- and ftp server won’t work without a sd-card.

#if ( ( mainHAS_SDCARD == 0 ) && ( mainCREATE_FTP_SERVER == 1 ) )
    #error The FTP server can only be created if mainHAS_SDCARD is 1.
#endif

heinbali01 wrote on Monday, November 13, 2017:

Hi Bob, that is true, the FreeRTOS HTTP- and FTP-servers like to have a storage device ( SD-card or RAM disk ). And this device is being accessed by FreeRTOS+FAT.

Some people though, provide their own set of access routines that emulate the functions in ff_stdio.h.

So if you have a very simple and “fixed” website contents, you could store the contents as const character arrays, and write some access functions to that contents.