stellaris-launchpad-template-gcc icon indicating copy to clipboard operation
stellaris-launchpad-template-gcc copied to clipboard

updated linkerscript again..

Open mroy opened this issue 12 years ago • 9 comments

Hi again,

I was still having strange problems with the version you pulled. I was getting more hard faults due to improperly initialized data section. The older version was working with a printf with no formating (ie printf("hello world");) and as soon as I added some parameters it was hard faulting again.

I ended up replacing the linker script with one based off another template and it seems to work well now. Take a look and pull if you like.

Mark.

mroy avatar Nov 21 '12 22:11 mroy

Hi, I tried pulling your changes and compiling it, still geting undefined references when linking it. Deleting the references to UARTprintf it compiles fine with the example. Can you please tell me how you link /utils/uartstdio and show me your main file too if possible?

scompo avatar Nov 21 '12 23:11 scompo

I'll revert the code to my last commit and create a test_newlib branch where we can work on the changes without breaking the last stable build.

scompo avatar Nov 22 '12 00:11 scompo

Hey scompo. Like the commit says, I removed the UARTstdio entries from LM4F_startup.c you should be able to compile without uartstdio now. when compiling make sure the right newlib is pulled in (defined as LIBM_PATH and LIBC_PATH in your makefile).

mroy avatar Nov 22 '12 00:11 mroy

I'll come up with a very simple main file to test it out.

mroy avatar Nov 22 '12 00:11 mroy

Thanks @mroy! Great, I'll make sure it points to the right one. It's ok if I use a test_newlib branch for the moment then merge the branch to main?

scompo avatar Nov 22 '12 00:11 scompo

I just committed my edits to main.c to make use of the printf and setup the uart. Note that I had to change those lines in the makefile as it tried to include the wrong version for me. The version I used is one I compiled, but the packaged thumb mode newlib should work too.

Are you on irc/freenode someplace? Maybe we could chat.

mroy avatar Nov 22 '12 00:11 mroy

No worries with where you put it, I just thought you might be interested since I've been banging my head against a wall for 2 days trying to get it to work right

mroy avatar Nov 22 '12 00:11 mroy

Sure I'm interested, would be really cool to get this working with newLib! I'm on #launchpad-template on freenode right now!

scompo avatar Nov 22 '12 01:11 scompo

hey, I just joined #launchpad-template on freenode.

mroy avatar Nov 22 '12 01:11 mroy