Tool/software: Starterware
Hey everyone,
i am trying to build a simple project, using gpio and timer interrupts in my beaglebone white..
My setup is: beaglebone white, starterware version 2.00.01.01, code composer studio version 6.1.0.00104.
So for my project, after including interrupt.c file from starterware (along with other source and header files, both from starterware and custom made ones) and
based on compiler's errors i found out, that i need to include:
the cpu.c file (i guess that for gcc compiler this is found in the path:/AM335X_StarterWare_02_00_01_01/system_config/armv7a/gcc/)
and exceptionHandler.S (located in this path:/AM335X_StarterWare_02_00_01_01/system_config/armv7a/am335x/gcc/)
and (maybe) cp15.S (located in path:/AM335X_StarterWare_02_00_01_01/system_config/armv7a/gcc/).
By building these, i get an executable, which i load to my beaglebone, but there seems that the interrupt controller is NOT working.
Now, i know that my code is not wrong since i pasted my code in dmtimerCounter example of starterware (and built it along with platform,utils,drivers and system_config folders
of starterware) and everything worked just fine.
I then assumed that i should also include the init.S (path is here:/AM335X_StarterWare_02_00_01_01/system_config/armv7a/gcc/), as it has initializing code routines, among
which some are relevant with irq.
If i do so,what happens is that i get the following build error:
selected processor does not support ARM mode `fmxr FPEXC,r0'
and specifically the error pop-ups in the last line of the following piece of code, taken from init.S:
@ Enable and initialise VFP and NEON
@
ORR r1, r1, #(0xf << 20) @ OR over CPACR read value so to enable CP's
MCR p15, #0, r1, c1, c0, #2 @ Write to CPACR
MOV r1, #0
MCR p15, #0, r1, c7, c5, #4 @ flush prefetch buffer because of FMXR below
MOV r0,#0x40000000 @ and CP 10 & 11 were only just enabled
FMXR FPEXC, r0 ; FPEXC = r0 @ Enable VFP itself
In order to overcome that problem, i added to the -mfpu (under properties->gnu compiler->runtime)the vfpv3-d16 option(although i am not sure it is correct).
Then i get more errors:
-undefined reference to `_stack'
-undefined reference to `_bss_start'
-undefined reference to `_bss_end'
-multiple definition of 'Entry'
Now i am not really familiar with linker script files, but i use the one automatically generated when creating a project (AM335x.lds) which doesn't seem to have any problem..
But, influenced by some other, merely relative, to be honest, posts from this forum, along with the fact that dmtimerCounter example of starterware worked successfully with
an other linker file, i tried to use the dmtimerCounter.lds (in starterware's example dmtimerCounter.asm is used, as it doesn't use the gcc compiler) instead of AM335x.lds
but unfortunately that was in vain too.
So my questions:
1)do i need init.S?
2)how can i overcome the errors that occur when i build init.S?
3)what do i have to do to make it work?
In general, i would be glad for any response, even if you are not sure, as it troubles me quite a long now and i am desperate even for the smallest hints...
Thanks in advance