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

Pages: [1]
1
µTasker general / Re: UART and simulator
« on: July 21, 2011, 09:20:33 PM »
Mark

I found the error, #define DEMO_UART was commented, now #define DEMO_UART 0, in app_hW_lpc23xx.h

ok

Thank you

Emerson

2
µTasker general / Re: UART and simulator
« on: July 21, 2011, 09:07:48 PM »
Mark

I have same problem of Rad, but I checked SerialPortID and DebugHandle, and SerialPorID=0 and  DebugHandle=255.

How can i fix the problem?

Thanks


Emerson

3
Marker

I changed sam7x.c file by sam7x.c from GNU_YAGARTO.zip. The first time that i download it, didn't have sam7x.c in zip pack.

I have copied new  sam7x.c to the hardware\sam7x directory.

I solved all problems, so i already compiled uTasker with GCC, excellent!

The code is small! I will test all functions!

Thanks a lot Marker, this work will motivate many developer use uTasker, open tools is a great idea!

Sincerely


Emerson M A Alves
tecnoemerson@interpira.com.br

4
Hi Marker

I got file to uTaskerBeta_ref_Rowley.zip, so i overried it with new files from uTaskerV1.3.0_SAM7X_SP1.zip and GNU_YAGARTO.zip, and made step by step in Eclipse, but i still got a error.

Sounds Good now, but i had a little error look:

make -k all
arm-elf-gcc -march=armv4t -mlittle-endian -mthumb -mthumb-interwork -Wall -Wstrict-prototypes -I..\..\uTaskerV1.3 -D _GNU -D _HW_SAM7X -g -c -Os ..\..\..\Hardware\SAM7X\SAM7X.c -o Build\SAM7X.o
..\..\..\Hardware\SAM7X\SAM7X.c:150: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
..\..\..\Hardware\SAM7X\SAM7X.c: In function 'EMAC_Interrupt':
..\..\..\Hardware\SAM7X\SAM7X.c:629: warning: suggest parentheses around assignment used as truth value
make: *** [Build\SAM7X.o] Error 1
make: Target `all' not remade because of errors.


What can i do?

Thanks

Emerson

5
ATMELTM AT91SAM7X and AVR32 / Re: porting uTasker to the winarmgcc
« on: August 14, 2007, 06:45:59 AM »
All Developers

Problem to porting uTasker to WINARM Solved!!!


I changed my tools to Yagaro and tool chain as described in James Lynch's latest "Using Open Source Tools for AT91SAM7S Cross Development revision C.

The tutorial use Yagarto + Eclipse use same GCC (gcc 4.1.1) of WINARM, but better than WINARM, more tools and detals!

I recommend all people that has sam7x to test the tutorial, it is step by step, very easy use it!

Excellents tools and Marker worked it, so go to topic: "Using Open Source Tools with SAM7X and uTasker project ".



Thanks

Emerson M A Alves
tecnoemerson@interpira.com.br
Brazil

6
Marker

What pack did you use in project? I have uTaskerBeta_ref_Rowley.zip packs !

You sent me makefile to compile utasker, i had problem in to compile it, the makefile and ld file in GNU_YAGARTO.zip  are different?

Didn`t you get error in make it? Error like this:

libarm_enable_irq() and libarm_disable_irq() in sam7x.c file! ???????


In:  hardware\sam7x\sam7x.c

// Routine to re-enable interrupts on leaving a critical region (IAR uses intrinsic function)
//
extern void uEnable_Interrupt(void)                                      // {3}
{
#ifdef _WINDOWS
    if (!iInterruptLevel) {
        *(int *)0 = 0;                                                   // basic error - cause simulator exception
        // A routine is enabling interrupt although they are presently off. This may not be a serious error but it is unexpected so best check why...
    }
#endif
    if (!(--iInterruptLevel)) {                                          // only when no more interrupt nesting,
    #if defined (COMPILE_IAR)
        __enable_interrupt();                                            // IAR intrinsic routine
    #elif defined (_GNU)
     libarm_enable_irq();
    #endif
    }
}


How did you fix this problem?

What is password to unzip GNU_YAGARTO.zip ?

May you send me bin file to me test it in board?


Thank you


Emerson M A Alves
Brazil



7
Marker

Congratulation by to dedicate your time in utasker to Open Source tools! Atmel has believed in Open Source tools.

I had problem in porting it,  i changed my tools, before i used WINARM, now i use Yagarto in tool chain as decribed by James Lynch in his article, i recomend all people that want use sam7x to install and test it, pretty good tools, excellent!

Excellent use GDB in Eclipse software, but i have used arm-jtag from Olimex, it use parallel port, it has worked well in simple examples code  by james Lynch, what do you think about it?

Well, i am working to porting uTasker, i hope that you can porting it!

Thank you, good job!

Sincerely.

Emerson M A Alves
Brazil

8
ATMELTM AT91SAM7X and AVR32 / Re: porting uTasker to the winarmgcc
« on: July 22, 2007, 04:45:23 AM »
Mark

Really i didn't identify with variable  ptMultiStartTable don't initialise with 0 value, in debugger i can see value in  ptMultiStartTable, so i tried two ways:

1: force  ptMultiStartTable =0 in sam7x.c code and  to compile.
2:  force  ptMultiStartTable  manualy in debugger.


In two situations debugger go until in utasker.c file:

// This is normally called from within a forever loop in main()
//
#ifdef MULTISTART
    extern MULTISTART_TABLE *uTaskerSchedule( void )
#else
    extern void uTaskerSchedule( void )
#endif
{
    TTASKTABLE *ptTaskTable = tTaskTable;                                // set at start and work down till bottom
    while (ptTaskTable->pcTaskName) {                                    // for each task in the task table
        if (ptTaskTable->ucTaskState & (UTASKER_GO | UTASKER_ACTIVATE)) {// if the task is to be scheduled
            uDisable_Interrupt();                                        // protect from interrupts during this check
            if ((ptTaskTable->TaskRepetition) || (!(ptTaskTable->ucTaskState & UTASKER_GO))) {
                if (ptTaskTable->ucEvent != 0) {                         // if woken from timer delay set write event to queue if there is one
                    unsigned char timer_message[HEADER_LENGTH];          // timer event message space
                    timer_message[MSG_DESTINATION_NODE] = INTERNAL_ROUTE;// internal event
                    timer_message[MSG_SOURCE_NODE] = INTERNAL_ROUTE;
                    timer_message[MSG_DESTINATION_TASK] = *(ptTaskTable->pcTaskName); // event to this task[/color


So in red part above, the degugger crash when in step in.

Thank you.

Emerson

9
ATMELTM AT91SAM7X and AVR32 / Re: porting uTasker to the winarmgcc
« on: July 20, 2007, 03:48:16 PM »
MarK

look the map file:
               0x0020009c                __bss_start__ = .
 *(.bss .bss.* .gnu.linkonce.b.*)
 .bss           0x0020009c       0x14 Build\application.o
                0x002000a4                ucSMTP_server
                0x002000a0                temp_pars
                0x0020009c                parameters
 .bss           0x002000b0       0x3c Build\debug.o
                0x002000b0                usData_state
 .bss           0x002000ec       0x58 Build\webInterface.o
 .bss           0x00200144        0x0 Build\KeyScan.o
 .bss           0x00200144        0x0 Build\LCD.o
 .bss           0x00200144        0x0 Build\NetworkIndicator.o
 .bss           0x00200144        0x0 Build\startup_gnu.o
 .bss           0x00200144      0x6e4 Build\SAM7X.o
 .bss           0x00200828        0x0 Build\eth_drv.o
 .bss           0x00200828        0x8 Build\Driver.o
                0x00200828                que_ids
 .bss           0x00200830        0xc Build\uMalloc.o
 .bss           0x0020083c       0x14 Build\uTasker.o
                0x0020083c                ptMultiStartTable
                0x00200840                JumpTable
 .bss           0x00200850       0x10 Build\Tty_drv.o
 .bss           0x00200860        0x8 Build\uFile.o
 .bss           0x00200868        0x0 Build\watchdog.o
 .bss           0x00200868       0x30 Build\GlobalTimer.o
 .bss           0x00200898       0x4c Build\Ethernet.o
                0x00200898                Ethernet_handle

All right to ptMultiStartTable or was necessary .bss in front line.

I wil check the variable initialisation

Thank you

Emerson

10
ATMELTM AT91SAM7X and AVR32 / Re: porting uTasker to the winarmgcc
« on: July 20, 2007, 05:43:42 AM »
Mark

After i had studied a lot about debugger, i use Eclipse + openOCD + arm-elf-gdb to debug software in olimex board.

I tested it with simple software that blink led, all righ, it worked very well.

So i tested utasker, the sequence in debug is:

file SAM7X.c

ptrSeed = &usRandomSeed;                        // 1  step in
 if (!WATCHDOG_DISABLE()) {                      // 2 step in
        WDT_MR = CONFIGURE_WATCHDOG;      // 3 step in                                   
           }

    fnUserHWInit();                             //4 step in call the function

When call function jump all and go to end of the function

extern void fnUserHWInit(void)
{
#ifdef LAN_REPORT_ACTIVITY
    CONFIGURE_LAN_LEDS();                                                // configure and drive ports
#endif

#ifdef SUPPORT_KEY_SCAN
    #if defined (STR912_SK)                                              // Since the port configuration on the STR91XF is a little complicated we do it in code here
        // Configure the keypad ports
        // Inputs - enable clock and disable port reset
        SCU_PCGR1 |= GPIO6;
        SCU_PRR1  |= GPIO6;

        // Outputs - enable clock and disable port reset (these are also inputs when not driving)
        SCU_PCGR1 |= GPIO5;
        SCU_PRR1  |= GPIO5;

        SCU_GPIOOUT6 &= ~((MASK_FUNCTION << (2*4)) | (MASK_FUNCTION << (2*5)) | (MASK_FUNCTION << (2*6)) | (MASK_FUNCTION << (2*7)));  // mask peripheral function select
        SCU_GPIOIN6  &= ~(KEY_ROW_IN_1 | KEY_ROW_IN_2 | KEY_ROW_IN_3 | KEY_ROW_IN_4);          // ensure input not connected to a peripheral
        GPIO_DIR_6   &= ~(KEY_ROW_IN_1 | KEY_ROW_IN_2 | KEY_ROW_IN_3 | KEY_ROW_IN_4);          // ensure inputs

        SCU_GPIOOUT5 &= ~((MASK_FUNCTION << (2*4)) | (MASK_FUNCTION << (2*5)) | (MASK_FUNCTION << (2*6)) | (MASK_FUNCTION << (2*7)));  // mask peripheral function select
        SCU_GPIOIN5  &= ~(KEY_COL_OUT_1 | KEY_COL_OUT_2 | KEY_COL_OUT_3 | KEY_COL_OUT_4);      // ensure input not connected to a peripheral
        GPIO_DIR_5   |=  (KEY_COL_OUT_1 | KEY_COL_OUT_2 | KEY_COL_OUT_3 | KEY_COL_OUT_4);      // prepare outputs
        GPIO_DATA_5  &= ~(KEY_COL_OUT_1 | KEY_COL_OUT_2 | KEY_COL_OUT_3 | KEY_COL_OUT_4);      // prepare outputs low
    #else
        INIT_KEY_SCAN();                                                 // General initialisation for key scamn
    #endif
#endif
}
  come here debugger  // 5 step in

  prtInfo = ptMultiStartTable;            //6  step in
   if (prtInfo == 0) {                 // 7 step in
    if (prtInfo->new_hw_init) {    //8 step in

so debugger crash, i am not sure if is problem with arm-elf-gdb or if really is problem in uTasker file compiled.

Do you have idea about it? I will continue trying debug it!!!    I have assembly sequency code too.

Thank you again!


Emerson
Brazil

11
ATMELTM AT91SAM7X and AVR32 / Re: porting uTasker to the winarmgcc
« on: July 18, 2007, 07:52:26 PM »
Mark

I have dedicated a lot in porting uTasker.

Ok, i removed -mthumb flag just  armVIC.o file from winarm, the  file size is smaller than previous, almost 55kb, so now i am trying debug it,  i use openocd and insight, so i have some questions:

Can i use simulator to test code?

What is fisrt file after reset sam7x?  is sam7x.c and function AT91_LowLevel_init?

Thank you again.


Emerson M A Alves
Brazil

12
ATMELTM AT91SAM7X and AVR32 / Re: porting uTasker to the winarmgcc
« on: July 18, 2007, 02:13:34 PM »
Yeah! Mark


I removed -mthum flag, so  fix the assembly error, but bin file don`t work in olimex board, but usb now is stable, before usb was in reset loop, maybe watchdog. The size of the file is 75kb was 52.

Thanks

Emerson

13
ATMELTM AT91SAM7X and AVR32 / porting uTasker to the winarmgcc
« on: July 18, 2007, 05:16:34 AM »
Hi

I have olimex board sam7x, i have tested it with uTasker compiled with IAR,  Marker sent to me bin file so it work very well.

I want use WinARM, i have made good code with it, USB CDC and USART, so i want use uTasker in my devices.

I want porting uTasker to compile with winarm, i have utasker makefile, but i had problem with libarm_enable_irq() and libarm_disable_irq() in sam7x.c file, functions from Rowley, i have used:

extern void __irq_en(void);  // enable interrupt in assembler code
 extern void __irq_dis(void);  // disable interrupt in assembler code


This form:

void libarm_disable_irq()
{
   __irq_dis();
}

void libarm_enable_irq()
{
  __irq_en();
 }


This modification don`t create compilation erros, but uTasker don`t work in board, i am trying debugger with openocd and insight GDB.

I had contacted winarm developer Martin Thomas, i ask him if winarm has lib that can fix this problem so he replied me:
         
         "Please browse the examples that come with WinARM for files called
          armVIC.h/.c (even if you find them in LPC2000 examples they can be used
          for the AT91SAM7 too). The functions enableIRQ and disableIRQ offer the
          needed functionality."


I use this files and functions inside, but i got another error in end of make compilation:

arm-elf-gcc -march=armv4t -mlittle-endian -mthumb -mthumb-interwork -Wall -Wstrict-prototypes -I..\..\uTaskerV1.3 -D _GNU -D _HW_SAM7X -g -c -Os ..\winarm_irq\armVIC.c  -o Build\armVIC.o
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s: Assembler messages:
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:25: Error: selected processor does not support `mrs r1,cpsr'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:39: Error: selected processor does not support `msr cpsr,r3'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:62: Error: selected processor does not support `mrs r1,cpsr'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:76: Error: selected processor does not support `msr cpsr,r3'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:98: Error: selected processor does not support `mrs r0,cpsr'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:108: Error: selected processor does not support `msr cpsr,r3'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:130: Error: selected processor does not support `mrs r0,cpsr'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:141: Error: selected processor does not support `msr cpsr,r2'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:163: Error: selected processor does not support `mrs r0,cpsr'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:173: Error: selected processor does not support `msr cpsr,r3'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:195: Error: selected processor does not support `mrs r0,cpsr'
C:\DOCUME~1\Emerson\LOCALS~1\Temp/ccYbbaaa.s:206: Error: selected processor does not support `msr cpsr,r2'
make.exe: *** [Build\uTasker.o] Error 1
[/color]

well, if somebody has experience in porting or how i can  fix the problem, please tell me.

I have makefile to winarm and uTasker bin to IAR, i have to openocd.cfg file and how load insight and openocd by programmenotepad, i can send by email just request me.

Thanks

Emerson M A Alves
Brazil
emerson@saaepirapora.com.br

Pages: [1]