Commit Graph

24 Commits

Author SHA1 Message Date
Andre Guedes
b8feaea30d x86: Add helpers.h
This patch adds the helpers.h. This file should contain only x86-related
helper functions and macros. For now, we define the BIT macro and halt()
helpers which will be used in upcoming patches.

Additionally, this patch also changes loader.S to call the halt().
2015-12-21 08:06:14 -02:00
Andre Guedes
41bca35c1e x86: Initialize Global Descriptor Table
This patch adds code to initialize the Global Descriptor Table. For
simplicity, the memory is organized following the flat model. Thus,
memory appears to Contiki as a single, continuous address space. Code,
data, and stack are all contained in this address space (so called
linear address space).

The macros to manipulate bits from segment descriptor and the
set_descriptor() helper are based on the ones described in [1].

[1] http://wiki.osdev.org/GDT_Tutorial
2015-12-21 08:06:14 -02:00
Andre Guedes
7e13081776 galileo: Print elf sections sizes after build
This patch changes Galileo's buildsystem to print the elf sections
sizes after a new image is built. This way we can easily track how
these sections increase or decrease after any change.

To achieve that, we define a custom linking rule which is pretty much
the same as the default linking rule define in Makefile.include, but
we run 'size' command after the image is built.
2015-12-21 08:06:14 -02:00
Jesus Sanchez-Palencia
3a26d9dbc7 x86: Only add elfloader-x86.c to the platforms using it
Currently there are only one platform using CPU x86: Cooja. The
elfloader-x86.c is rather a POSIX implementation, so the Galileo port
won't use it for now. This patch fixes this by moving this source file to
be included by the platforms using it instead of the cpu's Makefile.
2015-12-21 08:06:14 -02:00
Jesus Sanchez-Palencia
5a0e2a7654 x86: Fix missing include warning due to memset usage 2015-12-21 08:06:14 -02:00
Adam Dunkels
bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
simonduq
95ae5c5d51 avoid unnecessary symbols.c/h copying 2012-03-26 23:00:43 +02:00
Ilya Dmitrichenko
499d3052ee Fixed TARGET=native compilation issues on Darwin. 2012-03-02 15:15:42 -05:00
Oliver Schmidt
f83fb3704b Replaced make-empty-symbols with empty-symbols.[c|h]
The symbol generation shell scripts cause CRLF issues on Windows/Cygwin again and again. Instead of fixing this yet again I opted to remove the symbol generation script at least for the "no symbols" scenario with two C source files to be copied.
2011-04-03 13:24:58 +02:00
adamdunkels
18486d4e3d Patch by Gideon Ernst: use explicit $(CONTIKI) path instead of implicit ../../ path to the mknmlist script 2009-09-03 17:41:58 +00:00
fros4943
4275ff4a9c added support for 64-bit architectures, as already added on the cooja mtarch clone (patch provided by Jesper Karlsson and David Gustafsson) 2009-03-13 15:02:23 +00:00
fros4943
da8ee90ef3 reverted last commit (sorry, committed wrong file.. :) 2009-03-13 14:49:10 +00:00
fros4943
d6ebba536c minor 64 bit fix: divide by sizeof(unsigned long) instead of constant 4 2009-03-13 14:40:07 +00:00
oliverschmidt
61f54204d7 Improved map file naming consistency. 2007-05-19 21:46:43 +00:00
oliverschmidt
ae2073cac9 Factored out setup directory search path for source files into Makefile.include.
- All compilers used support the -I option for setting an include search directory.

- The Contiki source tree follows the (common) approach of placing declarations (in headerf iles) in the same directory as definitions (in source files).

As a result it makes sense to use the -I compiler option for just the same set of directories used for the vpath gnumake directive.

Note: I checked several builds but nevertheless one or the other might need some additional adjustsments. Sorry for the inconvenience.
2007-05-19 07:54:53 +00:00
oliverschmidt
237b1617b5 Factored out setup directory search path for source files into Makefile.include.
- Search target specific directories before CPU specific directories.
- Search CPU specific directories before generic directories.

Note: I checked several builds but nevertheless one or the other might need some additional adjustsments. Sorry for the inconvenience.
2007-05-13 08:41:11 +00:00
adamdunkels
7db75a8aa6 x86 elfloader 2007-03-28 20:27:13 +00:00
adamdunkels
8293e6215f Added elfloader-stub, symbols generation 2007-03-22 23:58:08 +00:00
adamdunkels
b0b3e5d0d6 Redefined LD to gcc to make things compile. Removed generation of symbols.[ch] due to problematic builds (seemingly neverending loops). 2007-03-15 21:52:00 +00:00
adamdunkels
2e8431b3d9 Added generation of symbols.[ch] 2006-12-19 09:21:12 +00:00
adamdunkels
e072e4084a Added a function for measuring stack usage 2006-09-26 20:56:42 +00:00
adamdunkels
fbcb4a97c2 Made stacksize configurable via external definition 2006-09-01 22:56:02 +00:00
adamdunkels
8ee4f7fc3d Removed out-commented stuff from Makefiles 2006-06-24 06:23:47 +00:00
adamdunkels
c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00