SD980 port

Now I am pissed.. I added a global variable to check the value of the pointer across functions, and now the problem doesn't happen anymore, so I am pretty sure it was some sort of buffer underrun..I also noticed that strncpy is just a partial match, and so is strncmp... I guess that could have caused the problem.

Yeah, I narrowed it down to strncpy, which does not appear to do a length checking, so it must be a different function.And while I was at it, I checked strcpy too, which was a perfect match, but not the right function. In fact, it was in the middle of some other function :/

Well, searching for those functions takes a lot of time, I could have written my own implementation 10 times faster, which I think I am going to end up doing. Any idea where I should put my own function versions, in such a way to not interfere with the rest of the project, and how should I define them?

Not sure why it doesn't work but it seems like a really kludgey way to do it.

I would suggest1) don't put strncpy in stubs_entry_2.S (leave a comment)2) define _strncpy in one of your platform C files (say wrappers.c). This should leave the generic code completely alone (it will still pick up _strncpy) , and your C code should override the weak version in stubs_entry.S

I've verified that this compiles OK, but you'll probably want to blink an LED in a function defined this way to make sure it actually gets linked right.

Wow, I managed to get the splash logo working, and I can also print debug text on the screen. Such a huge PITA, but now I can finally forget about the LED debugging (well, at least for most of the stuff)

Well, my *(int*)0x1930=(int)taskCreateHook; didn't seem to do anything, taskCreateHook() was never executed..So what I did was to find the memory location that needed to be replaced with mykbd_task, and I did the replacement instead of hooking taskCreateHook..

I put my led blinking code in mykbd_task_proceed(), and it doesn't seem to get there.. Any ideas?