[En-Nut-Discussion] H8/300 Question: Print Format Specifier Forsize_t
Jan Dubiec
jdx at slackware.pl
Thu Mar 18 18:04:52 CET 2004
Harald Kipp wrote:
> There had been a post one year ago from Mike
> Cornelius
>
> http://www.egnite.de/pipermail/en-nut-discussion/2003-July/000944.html
>
> Jan, what's your opinion about switching to -mint32?
>
I don't mind. Binaries will be slightly bigger (AFAIR not more than
10%). Fortunately eg. H8/3068F has enough Flash and RAM to run a lot of
Nut/OS applications using only these memories without taking care of
integer size.
After midnight :-) I will add -mint32 to configure script. I will fix
also debugging stuff as I promised earlier.
> I agree with Mike, that it is really odd to have
> sizeof(int) differing from sizeof(size_t).
>
Yes, that's a good point.
Just a note to Mike's post: present H8 MCUs can work in two modes:
- normal mode (compatible with an old H8/300 core) - 16 bit CPU,
registers are 16 bit (but can be 8 bit), pointers are 16 bit so such a
device can address only 64KiB (IMO this is the major disadvantage of the
normal mode); H8/Tiny family works only in this mode;
-advanced mode - 16 bit CPU (according to Renesas, IMO it is 32bit CPU
with 16 bit data bus - instructions can operate on 32bit arguments),
registers are 32 bit (but can be 8 or 16 bit), pointers are 32 bit
although physical address bus may be narrower (eg. 24 bit in 3068F so it
can address "only" 16MiB)
H8 micros have two cores: H8/300H and H8S (sometimes called H8/300S).
H8S is redesigned H8/300H - it has the same instruction set but is
faster at the same clock frequency. Both are often referenced as H8/300
what is wrong IMO. AFAIK H8/300 was (is?) 8 bit core. H8/300H and H8S
are just based on it.
Regards,
/J.D.
More information about the En-Nut-Discussion
mailing list