Page 1 of 1

need stdint.h using meaty skeleton

Posted: Fri Feb 05, 2016 8:36 am
by bilsch01
I'm trying to compile and link meaty skeleton for debugging. I'm doing it with command line in linux Ubuntu. There are several header files in tty.c which have very little meat to them, in particular, stdint.h. There is no such file in meaty skeleton, so the compiler is trying to use the one from the cross compiler. The one from the cross compiler has no definition of size_t or uint_16 types. It has the line:
# include_next<stdint.h> which gets nothing. Before I can debug tty.c linked with an assembly routine I must add debug option in the command line. I'm not using the makefile and shell files to build this for debugging - I'm using the command line as follows:

i686-elf-gcc tty.c -c && i686-elf-gcc -gdwarf kb1.o tty.o -o tty.o -ffreestanding -fbuiltin -Wall -Wextra -nostdlib -lk -lgcc

with header files copied to appropriate locations. But there is no stdint.h file. I can't proceed without it. I seem to be getting by without stddef.h

TIA. Bill S.

Re: need stdint.h using meaty skeleton

Posted: Fri Feb 05, 2016 5:27 pm
by Nutterts
Plz read this first.
At the very least try to google things like this.

But for what it's worth:
  • size_t isn't part of stdint.h, it's in stddef.h.
  • stdint.h contains standard types like uint16_t, int16_t etc. Not custom definitions like uint_16.
Both files are part of a properly compiled gcc like you get after following the instructions on the wiki.
bilsch01 wrote:i686-elf-gcc tty.c -c && i686-elf-gcc -gdwarf kb1.o tty.o -o tty.o -ffreestanding -fbuiltin -Wall -Wextra -nostdlib -lk -lgcc
I hope you just typed this in a hurry and left stuff out because this is wrong on so many levels.