I am working on creating a port for LPC1347 to contiki-os. I have 2 questions:
1: What i do not understand is how would the os know what architecture the hardware follows ie, whether is Harvard architecture or Neumann architecture. The microcontroller has 2 srams, so does the compiler or linker provide the libraries(addresses of memories) for the OS? Also, how does the OS know the address of RAM, is it provided by linker?
2: Contiki does not have device/peripheral driver API so how do i work about adding peripherals? I see there are functions like leds_toggle in apps/shell/shell-blink.c . My question is how can i know what libraries are/would be required to run a basic LED program.
The Makefiles select the compiler and pass the appropriate parameters. Have a look at the Makefiles in platform and cpu. They set the compiler (CC
) and lots of flags for the compiler (CFLAGS
) and linker (LDFLAGS
).
The platform is selected by setting the TARGET
-make-parameter and the platform selects the CPU.
As for the additional question: The make-files also select the files to use for compilation.
Also try running make with V=1
, then the calls to the compiler will be printed to th output.