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

Pages: 1 [2] 3
16
µTasker general / Re: memory allocation
« on: January 25, 2009, 01:03:30 PM »
Hi Mark,

Your solution working very fine :) I made tests also on real hardware.
I made tests with various allocation size and it works! But always _HEAPSIZE_ should be 20 greater than maximum allocated memory
for example:
when we use:
malloc(1024);
_HEAPSIZE_ = 1044;
and then is no problem.

Thanks for your help!!!

Regards,
robo

17
µTasker general / Re: memory allocation
« on: January 24, 2009, 01:48:02 PM »
Hi Mark,

When I only add syscalls.c doesn't fix the problem. I think that it need integrate with uTasker system...
I tried also to biuld project with malloc in Rowley and it compile but when program is running it hangs in place where malloc is used. How to solve this problem?

regards,
robo

18
µTasker general / Re: memory allocation
« on: January 11, 2009, 03:57:36 PM »
Hi Mark,

Before I started with uTasker I had same problem, in Eclipse, and it disappear when i add syscalls.c file, but now I don't know where I must add this and how?

//syscalla.c
#include <stdio.h>
#include <sys/stat.h>

char str[100];
char *cp = str;

void writechar(char ch);


int _close(int file) {
    return -1;
}

int _exit(int x) {
    while (1);
}

int _fstat(int file, struct stat *st) {
    st->st_mode = S_IFCHR;
    return 0;
}

int _lseek(int file, int ptr, int dir) {
    return 0;
}
int isatty(int file) {
    return 1;
}

int _read(int file, char *ptr, int len) {
    return 0;
}

extern int  __HEAP_START;

caddr_t _sbrk ( int incr )
{
  static unsigned char *heap = NULL;
  unsigned char *prev_heap;

  if (heap == NULL) {
    heap = (unsigned char *)&__HEAP_START;
  }
  prev_heap = heap;

  heap += incr;

  return (caddr_t) prev_heap;
}


int _getpid() {
    return 1;
}

#include <errno.h>
#undef errno
extern int errno;
int _kill(int pid, int sig) {
    errno=EINVAL;
    return (-1);
}

void writechar(char ch) {
    *cp++ = ch;
    if (cp == (str + 100))
        cp = str;
}

int _write(int file, char *ptr, int len) {
    int todo;
    for (todo = 0; todo < len; todo++) {
        writechar(*ptr++);
    }
    return len;
}

regards,
robo

19
µTasker general / Re: memory allocation
« on: January 11, 2009, 02:40:31 PM »
Hi Mark,

Ok, I know how to use malloc and free functions in C but I have problem with build project when I want to use it.
I'm working with gcc compiler and LM3S6965 and when I'm building project i have one error:
"1>c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/lib/thumb2\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
1>sbrkr.c:(.text+0xc): undefined reference to `_sbrk'
1>collect2: ld returned 1 exit status
1>cs-make: *** [uTaskerV1.3.elf] Error 1"

Do you know what can be wrong?

I have also tried biuld project in Rowley and there is no problem but after programming uP hangs in places where malloc function is in use...

regards,
robo

20
µTasker general / Re: memory allocation
« on: January 10, 2009, 09:05:27 PM »
Hi Mark,

Thanks for reply now it is clear for me :)
Do you have some examples how to use malloc() and free() with LM3S6965 projects?

Regards,
robo

21
µTasker general / memory allocation
« on: January 10, 2009, 06:35:30 PM »
Hi,

In uTasker there is function uMalloc for memory allocation, but is there function to free this memory?

Regards,
robo 

22
Luminary Micro TM LM3SXXXX / Re: SPI_SW_UPLOAD in LM3S6965
« on: January 09, 2009, 07:02:57 PM »
Hi Mark,

Thanks again for halp!
this will be very helpfull for me.

Regards
robo

23
Luminary Micro TM LM3SXXXX / Re: SPI_SW_UPLOAD in LM3S6965
« on: January 09, 2009, 06:13:43 PM »
Hi Mark,

I have tried to biuld uTaskerBoot in SP1 with SPI_SW_UPLOAD option and it also doesn't work... there are some errors.
What could be wrong?

regards,
robo


24
Luminary Micro TM LM3SXXXX / Re: SPI_SW_UPLOAD in LM3S6965
« on: January 09, 2009, 02:17:22 PM »
Hi Mark,

Thanks very much!!! I will try first with sp1 like you said.

regards,
robo

25
Luminary Micro TM LM3SXXXX / Re: SPI_SW_UPLOAD in LM3S6965
« on: January 09, 2009, 08:42:11 AM »
Hi,

I'm using SP2...

Regards,
robo

26
Luminary Micro TM LM3SXXXX / Re: SPI_SW_UPLOAD in LM3S6965
« on: January 08, 2009, 11:38:36 PM »
Hi Mark,

I have tried to activate  #define SPI_SW_UPLOAD  and #define SPI_FLASH_ST in uTaskerBoot config.h file but then there is lot of errors...
should I add to project SPI function?

regards,
robo

27
Luminary Micro TM LM3SXXXX / Re: SPI_SW_UPLOAD in LM3S6965
« on: January 08, 2009, 07:59:13 PM »
Hi Mark!

Thanks for fast reply! But I should enable SPI SOFTWARE UPDATE in uTasker code? Should I use the same boot loader minimum?

regards,
robo

28
Luminary Micro TM LM3SXXXX / SPI_SW_UPLOAD in LM3S6965
« on: January 08, 2009, 07:22:11 PM »
Hi,

Is there possible to make software update with SPI FLASH and LM3S6965?
How to make option SPI_SW_UPLOAD in LM3S6965?

Please help?
robo

29
Luminary Micro TM LM3SXXXX / Re: ST SPI FLASH (M25P80) problem
« on: November 25, 2008, 05:59:17 PM »
Hi Mark,

They are shorter than 5cm. I also look on scope and there is no siglal on any SPI lines... I don't know why.

regards
robo

30
Luminary Micro TM LM3SXXXX / ST SPI FLASH (M25P80) problem
« on: November 25, 2008, 05:04:58 PM »
Hi,

I have problem with M25P80, because it work in simulator but doesn't work on hardware...
I was checked connection and is ok. What can be wrong??

robo

Pages: 1 [2] 3