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.


Messages - Stan

Pages: [1] 2
1
ATMELTM AT91SAM7X and AVR32 / uTasker on SAM7X512
« on: May 22, 2009, 05:10:23 PM »
Hello,

I'm trying to run the uTasker for CrossStudio on SAM7X512. The only differences that I saw from SAM7X256 are:
                     SAM7X256            SAM7X512
Flash Size:           256K                     512K
RAM Size:             64K                      128K
Lock Bits               16                        32

The Flash in SAM7X512  is:
"Organized in Two Banks of 1024 Pages of 256 Bytes (Dual Plane)"
instead of
"Organized in 1024 Pages of 256 Bytes (Single Plane)"

and that's why:

"The AT91SAM7X512 is equipped with two EFCs, EFC0 and EFC1. EFC1 does not feature the
Security bit and GPNVM bits. The Security and GPNVM bits embedded only on EFC0 apply to
the two blocks in the AT91SAM7X512."

I couldn't find any other differences and I think that I should be able to use the uTasker on SA7X512 without any changes. I think there is no difference in accessing the first Bank of 256K so I can't explain to myself what is the problem.

I made a simple CrossStudio project with their startup files (using AT91SAM7_Startup.s, crt0.s, etc.) which only blinks one LED and It works fine. However the same source won't work using startup_gnu.s and SAM7X.c.

I tried to see what are the differences but couldn't find what's wrong.

Any help will be appreciated!  :)

Best Regards
Stan





2
µTasker general / Re: http.c. Not parsing form posts correctly
« on: April 13, 2009, 12:05:27 PM »
Hi Mark,

I searched all files but I don't have anywhere PLAIN_TEXT_POST in my project. I use uTasker V1.3 with SAM7X with SP3.
Although I have these in my config.h and all are defined:

#define SUPPORT_HTTP_POST                                    // support file uploads using POST command
#define SUPPORT_HTTP_POST_TO_APPLICATION
#define SUPPORT_POST_BINARY
#define SUPPORT_POST_TEXT
#define SUPPORT_POST_GIF

I can't find POSTING_PARAMETER_DATA_TO_APP as a definition too. I'm simply trying to pass a password with the POST method but still can't figure out what I'm supposed to do.

Best Regards
Stan


3
µTasker general / Re: http.c. Not parsing form posts correctly
« on: April 10, 2009, 08:15:39 AM »
Hello,

I'm  also trying to send parameters with POST method. I read this topic and saw that you are talking about 

Quote
When the frame is received, the application call-back (fnHandleWeb() in webInterface.c) will receive the event type POSTING_DATA_TO_APP with a pointer to the received content *ptrData. The length is HTTP_session->FileLength.

What I have in my webInterface.c is:
...
    switch (ucType) {
#ifdef SUPPORT_HTTP_POST
    #ifndef _HW_NE64
        #if FILE_SYSTEM_SIZE >= (160*1024)                               // support posting new firmware only with large file system
    case CAN_POST_BEGIN:
      //return (1);                                                      // block upload!!
        return (0);                                                      // allow post at all times

    case INFORM_POST_FAILED:
        http_session->ptrFileStart = (unsigned char*)cWarningHTML;
        http_session->FileLength   = sizeof(cWarningHTML)-1;
            #ifdef SUPPORT_MIME_IDENTIFIER
        http_session->ucMimeType   = MIME_HTML;                          // force HTML type
            #endif
        return DISPLAY_INTERNAL;
        #endif

    case INFORM_POST_SUCCESS:
        #ifdef SUPPORT_MIME_IDENTIFIER
        http_session->ucMimeType = MIME_HTML;                            // force HTML type
        #endif
        if (http_session->cDisplayFile == 'S') {                         // software upload
            http_session->ptrFileStart = (unsigned char*)cSuccessSW_HTML;
            http_session->FileLength = sizeof(cSuccessSW_HTML)-1;
            uTaskerMonoTimer( TASK_APPLICATION, (DELAY_LIMIT)(1*SEC), 0 ); // wait 1 second to load the page
            fnDelayResetBoard();                                         // after 2 seconds the application will reset and then the new software will be copied
        }
        return DISPLAY_INTERNAL;
    #endif
#endif
...

So how can I handle incoming parameters from POST method?
Should I add case POSTING_DATA_TO_APP by myself? I see that in http.c I have a row:
    fnHandleWeb(POSTING_DATA_TO_APP, (CHAR *)ucIp_Data, http_session);
So I guess it passes the event correctly but there is no place where fnHandleweb() handles it.

Best Regards
Stan
 

4
Hi Mark,

Yes, the problem was that didn't read the message correctly. Thanks for your quick answer, now it works fine! :]

Best Regards
Stan

5
Hello everyone,

I'm trying to implement the ping request in my board. I'm using AT91SAM7X256.

I have a task in which I do:
...
if (z % 200 == 0) // This is executed every 10 seconds
   fnSendPing(PING_ADDRESS, MAX_TTL, OWN_TASK, PING_SOCKET); 
     
switch(ptrTaskTable->ucEvent){
    case PING_RESULT: ser_write_string(RS232_UART, "\n\r Ping OK"); break;
    case ARP_RESOLUTION_SUCCESS: ser_write_string(RS232_UART, "\n\r ARP Success"); break;
}

...

OWN_TASK is defined to be the same as the first letter of my task's name, in my case it's '_' .
I saw that it goes in case ECHO_PING_REPLY in fnHandleICP() and it writes '_' in int_message[MSG_DESTINATION_TASK]. I'm not sure but I think something is wrong with the scheduler. I check my task's  ucEvent field with the Watch but it's always 0.

In config.h I have all the definitions:
#define USE_ICMP                                                // enable ICMP

        #ifdef USE_ICMP                                              // specify ICMP support details
            #define ICMP_PING                                       // allow PING reply
            #define ICMP_SEND_PING                               // support PING transmission
            #define ICMP_DEST_UNREACHABLE                   // allow destination unreachable if no UDP port exists
        #endif


Any help will be appreciated :) Thanks!

6
ATMELTM AT91SAM7X and AVR32 / Re: FTP Server stopped working
« on: September 19, 2008, 02:16:12 PM »
Hi Mark,

Thank you for your quick answer! You have done great online documentary.
As for the http://www.utasker.com/docs/Code.html I saw that most of the links aren't working but I'm sure you will complete this and it will be great! Thanks!

7
ATMELTM AT91SAM7X and AVR32 / Re: FTP Server stopped working
« on: September 19, 2008, 09:25:58 AM »
One more thing to ask...what should I change to make the ftp password protected and where is the variable in which the password is defined? Thanks in advance!

8
ATMELTM AT91SAM7X and AVR32 / Re: FTP Server stopped working
« on: September 19, 2008, 08:55:35 AM »
Well I guess I fixed the problem somehow. I restarted my laptop and my pc and now I can access the ftp through my pc. But I still can't understand what happened  ???

9
ATMELTM AT91SAM7X and AVR32 / Re: FTP Server stopped working
« on: September 19, 2008, 08:46:17 AM »
The strangest thing is that I've just tried to open it through my laptop and there was no problem, but I still can't open the ftp from my computer, do you know if there are some settings which I have to check. I should remind that I haven't made any changes from yesterday to now.

10
ATMELTM AT91SAM7X and AVR32 / FTP Server stopped working
« on: September 19, 2008, 08:42:07 AM »
Hello,

Today I saw a strange effect concerning uTasker's FTP Server. Yesterday everything seemed to be fine. Today when I run my device I couldn't open the ftp, I tried to open it through MS Explorer and I got a message which said:

"The folder "ftp://192.168.0.231/" is read-only because the proxy server is not set up to allow full acess.

To move, paste, rename, or delete files, you must use a different proxy. For information on changing your proxy contact your administrator."

After that it opened me the address in read-only mode and there was only the -r Empty file.

I'm not sure if it's problem in uTasker or in Windows or in my network because I erased the entire flash and uploaded the uTasker again but the problem still occurs. 

11
ATMELTM AT91SAM7X and AVR32 / Re: Bootloader and Flash segments
« on: June 16, 2008, 08:00:12 AM »
Hi Mark,

Thank you for your explanation. I understand now :]


12
ATMELTM AT91SAM7X and AVR32 / Re: Bootloader and Flash segments
« on: June 13, 2008, 04:01:32 PM »
Hi Mark,

Thank you for the quick reply! Everything is working now. You were right I use 3,5K for parameters with SWAP which makes total of 7K in flash. How should I calculate the checksum (ucKey[]) if I want to change this 1234 (VALID_VERSION_MAGIC_NUMBER)?

Thanks.

13
ATMELTM AT91SAM7X and AVR32 / Bootloader and Flash segments
« on: June 12, 2008, 12:58:19 PM »
Hello,

I work with SAM7X256 and I've made some changes in the uTasker's code because I wanted to use custom web pages with custom parameters. This is what I did:

1) I inserted my array of parameters in struct stPARS (application.h)

2) I increased PARAMETER_BLOCK_SIZE from 2*FLASH_GRANULARITY(1k) to 14*FLASH_GRANULARITY(7k) as I need more space for the parameters (app_hw_sam7x.h)

3) I changed UPLOAD_FILE_LOCATION from 0x127800 to 0x129000 (uTaskerBootLoader.c in Bootloader's project) - I increase this address with 6kbyte as I increase parameter block size with 6kbyte

Do I have to make more changes in order to work everything properly? Now I upload z_Upload.bin file, reboot and when uTasker is loaded I see that it deletes the bin file for the ftp but software remains the same, the newer version is not loaded.


There are few things to mention:

1) In uTasker's Documents it is said that the files in the file system are in the following order: 0...9a...zA...Z
but in the source code they are 0...9A...Za...z like in ASCII.

2) I don't think that it's good idea UPLOAD_FILE_LOCATION to be constant number.

3) From what I see the FLASH memory is divided in the following order(originally):

0x100 000 - FLASH start

0x100 000 to 0x100 6FF - Bootloader

0x100 700 to 0x117 FFF - Application

0x118 000 to 0x118 400 - Parameters (0x400 = 1024 = 1k which is by default)

0x118 401 to 0x127 7FF - File System

0x127 800 to 0x140 000 - Space for uploading new software (0x127 800 is the address on which file starting with 'z' is placed)

0x140 000 - FLASH end

Am I right?

4) Where ucKey[] = {0xa7, 0x48, 0xb6, 0x53, 0x11, 0x24} is placed in the bin file?

5) When I open z_Upload.bin with HEX editor I see:
00 00 B3 61 12 34 ... at the start of the file. What 0000 and B361 are for?

When I upload this file to the FTP and read the SAM7X memory from the CrossStudio I see:

69 B3 00 00 05 00 00 B3 61 12 34 ...

Do you know what happens?


Thanks in advance!

14
µTasker general / Re: uTaskerBoot for CrossStudio
« on: April 10, 2008, 03:57:33 PM »
Hi Mark,

Thank you for your quick reply again :)
I've tried what you said but with no success.

First I tried to compile and merge the original files for Bootloader and uTasker  in IAR, they wen fine (with few errors in bootloader's source but I fixed them), then I merged them and upload with samba - eveything went ok, tried to change the software via the ftp - ok.

Then I compiled the CrossStudio Project with these changes in uTaskerSAM7X_FLASH.ld:

Before:
------------------------------------------------------------------------------------
MEMORY
{
  SRAM (wx) : ORIGIN  = 0x00200000, LENGTH = 0x00010000
  FLASH (rx) : ORIGIN = 0x00100000, LENGTH = 0x00040000
}

SECTIONS
{
  __SRAM_segment_start__  = 0x00200000;
  __SRAM_segment_end__    = 0x00210000;
  __FLASH_segment_start__ = 0x00100000;
  __FLASH_segment_end__   = 0x00140000;
------------------------------------------------------------------------------------

After:
------------------------------------------------------------------------------------
MEMORY
{
  SRAM (wx) : ORIGIN  = 0x00200000, LENGTH = 0x00010000
  FLASH (rx) : ORIGIN = 0x00100700, LENGTH = 0x00040000
}

SECTIONS
{
  __SRAM_segment_start__  = 0x00200000;
  __SRAM_segment_end__    = 0x00210000;
  __FLASH_segment_start__ = 0x00100700;
  __FLASH_segment_end__   = 0x00140000;
------------------------------------------------------------------------------------

I merged the files and uploaded it with samba but with no success. After this operation the LEDs for Link&Act, Speed and Full Duplex are blinking together in some kind of "alarm" mode.

Is there anything else which I am missing? I'm not sure if this change in the .ld file is enough, probably there are more differences between IAR and CrossStudio projects. And one more thing: I think the length for SRAM and FLASH in CrossStuio are too big, is this a problem, I saw that in IAR they are with shorter length?

Regards

Stan

15
µTasker general / Re: uTaskerBoot for CrossStudio
« on: April 07, 2008, 10:12:36 AM »
Hi Mark,

I haven't been able to write since my last post, so here I am again.

I'm talking about SAM7X. From what I understand I need uTasker Project for CrossStudio  with Bare-minimum configuration too. Or you can just help me to modify the .ld file. Thanks!

Regards

Stan

Pages: [1] 2