HPGCC3 Documentation 3.0 R003

hpgcc_config.h File Reference

Configuration constants for the hpgcc runtime libraries. More...

Go to the source code of this file.

Defines

#define HPGCC_VERSION   3.0
 The library revision number.
#define HPGCC_VERSION_MAJOR   3
 The library major revision number.
#define HPGCC_VERSION_MINOR   0
 The library minor revision number.
#define ROMLIB_BUILD   0x003
 Activate patch for broken kos_fopen() mode "a" workaround.
#define ARMCODE_CONFIG(var)   unsigned int __##var __attribute__ ((section(".config")))
 Executable configuration macro.
#define USE_MAINRAM   0x00010000
 Instruct the launcher to allocate and use main ram for the heap.
#define USE_ERAM   0x00020000
 Instruct the launcher to allocate and use ERAM for the heap.
#define USE_KOSRAM   0x00040000
 Instruct the launcher to allocate and use KOS ram for the heap.
#define RESERVE_TEMPOB(a)   (a&0xff)
 Instruct the launcher to reserve memory (kbytes) for TEMPOB growth.
#define RESERVE_USEROB(a)   ((a&0xff)<<8)
 Instruct the launcher to reserve memory for stack and USEROB growth.
#define MAKE_ROMLIB_VER(n)   ( ((n&0xf0)<<12) | ((n&0xf00)) | ((n&0xf)<<24) | 0x30303052)
 Convert BCD version number into version word.
#define _ENABLE_INTS   0x00000001
 Instruct the launcher to leave interrupts enabled at startup.
#define _SPEED_6MHZ   0x00000020
 Instruct the launcher to switch to 1 MHz mode at startup.
#define _SPEED_12MHZ   0x00000000
 Instruct the launcher to switch to 12 MHz mode at startup (default)
#define _SPEED_48MHZ   0x00000030
 Instruct the launcher to switch to 48 MHz mode at startup.
#define _SPEED_75MHZ   0x00000040
 Instruct the launcher to switch to 75 MHz mode at startup.
#define _SPEED_120MHZ   0x00000050
 Instruct the launcher to switch to 120 MHz mode at startup.
#define _SPEED_152MHZ   0x00000060
 Instruct the launcher to switch to 152 MHz mode at startup.
#define _SPEED_192MHZ   0x00000070
 Instruct the launcher to switch to 192 MHz mode at startup.
#define _NO_SPEEDCHANGE   0x000000f0
 Instruct the launcher not to change clock speed.
#define _CLK_MODE_MSK   0x000000f0
#define _NO_WAITKEY   0x00000002
 Instruct the launcher not to wait for all keys released before returning.
#define _NO_GUI_CONSOLE   0x00000004
 Instruct the launcher not to initialize the stdio module.
#define _NO_SCREEN   0x00000008
 Instruct the launcher not to initialize the screen.
#define _NO_TIMERS   0x00000100
 Instruct the launcher not to initialize the timers.
#define _NO_EXCEPTIONS   0x00000200
 Instruct the launcher not to catch exceptions.
#define _NO_KEYBOARD   0x00000400
 Instruct the launcher not to install a keyboard handler.
#define _RAW_EXECUTE   (_NO_KEYBOARD | _NO_EXCEPTIONS | _NO_TIMERS | _NO_SCREEN | _NO_GUI_CONSOLE | _NO_WAITKEY | _NO_SPEEDCHANGE | _ENABLE_INTS)
 Use typical options to execute programs with minimal support from hpgcc libraries. Timers, keyboard, graphics, exceptions, stdio, cpu speed are all disabled and cannot be used. Interrupts are left enabled, therefore code cannot run in Thumb mode.
#define _STACK_ONLY   (_NO_KEYBOARD | _NO_TIMERS | _NO_SCREEN | _NO_GUI_CONSOLE | _NO_WAITKEY | _NO_SPEEDCHANGE)
 Use typical option for programs that run on the stack only (no user interaction). Timers, keyboard, graphics, stdio, cpu speed are disabled and cannot be used. Exceptions are trapped and Thumb code can run normally.
#define _STACK_SPEED   (_NO_KEYBOARD | _NO_TIMERS | _NO_SCREEN | _NO_GUI_CONSOLE | _NO_WAITKEY)
 Use typical option for programs that run on the stack only (no user interaction). Similat to _STACK_ONLY, but also allows to change the cpu speed.
#define _STACK_SPEED_120MHZ   (_STACK_SPEED | _SPEED_120MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define _STACK_SPEED_152MHZ   (_STACK_SPEED | _SPEED_152MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define _STACK_SPEED_192MHZ   (_STACK_SPEED | _SPEED_192MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define _STACK_SPEED_75MHZ   (_STACK_SPEED | _SPEED_75MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define _STACK_SPEED_48MHZ   (_STACK_SPEED | _SPEED_48MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define _STACK_SPEED_12MHZ   (_STACK_SPEED | _SPEED_12MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define _STACK_SPEED_6MHZ   (_STACK_SPEED | _SPEED_6MHZ)
 Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.
#define ARMCODE_CONFIG_STACK_STANDARD   ARMCODE_CONFIG(startup)=_STACK_SPEED | _NO_SPEEDCHANGE; ARMCODE_CONFIG(memory_req)=USE_MAINRAM|USE_ERAM|USE_KOSRAM|RESERVE_TEMPOB(16)|RESERVE_USEROB(16);
 Convenience configuration options and memory requirements for stack programs.
#define ARMCODE_CONFIG_STACK_SLOW   ARMCODE_CONFIG(startup)=_STACK_SPEED_12MHZ; ARMCODE_CONFIG(memory_req)=USE_MAINRAM|USE_ERAM|USE_KOSRAM|RESERVE_TEMPOB(16)|RESERVE_USEROB(16);
 Convenience configuration options and memory requirements for stack programs.
#define ARMCODE_CONFIG_STACK_OVERCLOCK   ARMCODE_CONFIG(startup)=_STACK_SPEED_192MHZ; ARMCODE_CONFIG(memory_req)=USE_MAINRAM|USE_ERAM|USE_KOSRAM|RESERVE_TEMPOB(16)|RESERVE_USEROB(16);
 Convenience configuration options and memory requirements for stack programs.
#define ARMCODE_CONFIG_STACK_FULLMEMORY   ARMCODE_CONFIG(startup)=_STACK_SPEED | _NO_SPEEDCHANGE; ARMCODE_CONFIG(memory_req)=USE_ERAM|USE_KOSRAM;
 Convenience configuration options and memory requirements for stack programs.
#define ARMCODE_CONFIG_STACK_FULLMEMORY_SLOW   ARMCODE_CONFIG(startup)=_STACK_SPEED_12MHZ; ARMCODE_CONFIG(memory_req)=USE_ERAM|USE_KOSRAM;
 Convenience configuration options and memory requirements for stack programs.
#define ARMCODE_CONFIG_STACK_FULLMEMORY_OVERCLOCK   ARMCODE_CONFIG(startup)=_STACK_SPEED_192MHZ; ARMCODE_CONFIG(memory_req)=USE_ERAM|USE_KOSRAM;
 Convenience configuration options and memory requirements for stack programs.

Detailed Description

Configuration constants for the hpgcc runtime libraries.

Definition in file hpgcc_config.h.


Define Documentation

#define _CLK_MODE_MSK   0x000000f0

Definition at line 350 of file hpgcc_config.h.

#define _ENABLE_INTS   0x00000001

Instruct the launcher to leave interrupts enabled at startup.

Definition at line 305 of file hpgcc_config.h.

#define _NO_EXCEPTIONS   0x00000200

Instruct the launcher not to catch exceptions.

Definition at line 371 of file hpgcc_config.h.

#define _NO_GUI_CONSOLE   0x00000004

Instruct the launcher not to initialize the stdio module.

Definition at line 358 of file hpgcc_config.h.

#define _NO_KEYBOARD   0x00000400

Instruct the launcher not to install a keyboard handler.

Definition at line 376 of file hpgcc_config.h.

#define _NO_SCREEN   0x00000008

Instruct the launcher not to initialize the screen.

Definition at line 362 of file hpgcc_config.h.

#define _NO_SPEEDCHANGE   0x000000f0

Instruct the launcher not to change clock speed.

Definition at line 345 of file hpgcc_config.h.

#define _NO_TIMERS   0x00000100

Instruct the launcher not to initialize the timers.

Definition at line 366 of file hpgcc_config.h.

#define _NO_WAITKEY   0x00000002

Instruct the launcher not to wait for all keys released before returning.

Definition at line 354 of file hpgcc_config.h.

#define _RAW_EXECUTE   (_NO_KEYBOARD | _NO_EXCEPTIONS | _NO_TIMERS | _NO_SCREEN | _NO_GUI_CONSOLE | _NO_WAITKEY | _NO_SPEEDCHANGE | _ENABLE_INTS)

Use typical options to execute programs with minimal support from hpgcc libraries. Timers, keyboard, graphics, exceptions, stdio, cpu speed are all disabled and cannot be used. Interrupts are left enabled, therefore code cannot run in Thumb mode.

Definition at line 381 of file hpgcc_config.h.

#define _SPEED_120MHZ   0x00000050

Instruct the launcher to switch to 120 MHz mode at startup.

Definition at line 330 of file hpgcc_config.h.

#define _SPEED_12MHZ   0x00000000

Instruct the launcher to switch to 12 MHz mode at startup (default)

Definition at line 318 of file hpgcc_config.h.

#define _SPEED_152MHZ   0x00000060

Instruct the launcher to switch to 152 MHz mode at startup.

Definition at line 335 of file hpgcc_config.h.

#define _SPEED_192MHZ   0x00000070

Instruct the launcher to switch to 192 MHz mode at startup.

Definition at line 340 of file hpgcc_config.h.

#define _SPEED_48MHZ   0x00000030

Instruct the launcher to switch to 48 MHz mode at startup.

Definition at line 322 of file hpgcc_config.h.

#define _SPEED_6MHZ   0x00000020

Instruct the launcher to switch to 1 MHz mode at startup.

Instruct the launcher to switch to 6 MHz mode at startup

Definition at line 314 of file hpgcc_config.h.

#define _SPEED_75MHZ   0x00000040

Instruct the launcher to switch to 75 MHz mode at startup.

Definition at line 326 of file hpgcc_config.h.

#define _STACK_ONLY   (_NO_KEYBOARD | _NO_TIMERS | _NO_SCREEN | _NO_GUI_CONSOLE | _NO_WAITKEY | _NO_SPEEDCHANGE)

Use typical option for programs that run on the stack only (no user interaction). Timers, keyboard, graphics, stdio, cpu speed are disabled and cannot be used. Exceptions are trapped and Thumb code can run normally.

Definition at line 386 of file hpgcc_config.h.

#define _STACK_SPEED   (_NO_KEYBOARD | _NO_TIMERS | _NO_SCREEN | _NO_GUI_CONSOLE | _NO_WAITKEY)

Use typical option for programs that run on the stack only (no user interaction). Similat to _STACK_ONLY, but also allows to change the cpu speed.

Definition at line 390 of file hpgcc_config.h.

#define _STACK_SPEED_120MHZ   (_STACK_SPEED | _SPEED_120MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 395 of file hpgcc_config.h.

#define _STACK_SPEED_12MHZ   (_STACK_SPEED | _SPEED_12MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 415 of file hpgcc_config.h.

#define _STACK_SPEED_152MHZ   (_STACK_SPEED | _SPEED_152MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 399 of file hpgcc_config.h.

#define _STACK_SPEED_192MHZ   (_STACK_SPEED | _SPEED_192MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 403 of file hpgcc_config.h.

#define _STACK_SPEED_48MHZ   (_STACK_SPEED | _SPEED_48MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 411 of file hpgcc_config.h.

#define _STACK_SPEED_6MHZ   (_STACK_SPEED | _SPEED_6MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 419 of file hpgcc_config.h.

#define _STACK_SPEED_75MHZ   (_STACK_SPEED | _SPEED_75MHZ)

Use typical option for programs that run on the stack only (no user interaction). Same as _STACK_SPEED, but including automatic speed change to the desired speed.

Definition at line 407 of file hpgcc_config.h.

#define ARMCODE_CONFIG (   var)    unsigned int __##var __attribute__ ((section(".config")))

Executable configuration macro.

Use this macro to configure memory requirements of your executable. See HPGCC3 build process and executable configuration.

Definition at line 271 of file hpgcc_config.h.

#define ARMCODE_CONFIG_STACK_FULLMEMORY   ARMCODE_CONFIG(startup)=_STACK_SPEED | _NO_SPEEDCHANGE; ARMCODE_CONFIG(memory_req)=USE_ERAM|USE_KOSRAM;

Convenience configuration options and memory requirements for stack programs.

Definition at line 437 of file hpgcc_config.h.

#define ARMCODE_CONFIG_STACK_FULLMEMORY_OVERCLOCK   ARMCODE_CONFIG(startup)=_STACK_SPEED_192MHZ; ARMCODE_CONFIG(memory_req)=USE_ERAM|USE_KOSRAM;

Convenience configuration options and memory requirements for stack programs.

Definition at line 445 of file hpgcc_config.h.

#define ARMCODE_CONFIG_STACK_FULLMEMORY_SLOW   ARMCODE_CONFIG(startup)=_STACK_SPEED_12MHZ; ARMCODE_CONFIG(memory_req)=USE_ERAM|USE_KOSRAM;

Convenience configuration options and memory requirements for stack programs.

Definition at line 441 of file hpgcc_config.h.

#define ARMCODE_CONFIG_STACK_OVERCLOCK   ARMCODE_CONFIG(startup)=_STACK_SPEED_192MHZ; ARMCODE_CONFIG(memory_req)=USE_MAINRAM|USE_ERAM|USE_KOSRAM|RESERVE_TEMPOB(16)|RESERVE_USEROB(16);

Convenience configuration options and memory requirements for stack programs.

Definition at line 433 of file hpgcc_config.h.

#define ARMCODE_CONFIG_STACK_SLOW   ARMCODE_CONFIG(startup)=_STACK_SPEED_12MHZ; ARMCODE_CONFIG(memory_req)=USE_MAINRAM|USE_ERAM|USE_KOSRAM|RESERVE_TEMPOB(16)|RESERVE_USEROB(16);

Convenience configuration options and memory requirements for stack programs.

Definition at line 429 of file hpgcc_config.h.

#define ARMCODE_CONFIG_STACK_STANDARD   ARMCODE_CONFIG(startup)=_STACK_SPEED | _NO_SPEEDCHANGE; ARMCODE_CONFIG(memory_req)=USE_MAINRAM|USE_ERAM|USE_KOSRAM|RESERVE_TEMPOB(16)|RESERVE_USEROB(16);

Convenience configuration options and memory requirements for stack programs.

Definition at line 425 of file hpgcc_config.h.

#define HPGCC_VERSION   3.0

The library revision number.

Definition at line 226 of file hpgcc_config.h.

#define HPGCC_VERSION_MAJOR   3

The library major revision number.

Definition at line 233 of file hpgcc_config.h.

#define HPGCC_VERSION_MINOR   0

The library minor revision number.

Definition at line 239 of file hpgcc_config.h.

#define MAKE_ROMLIB_VER (   n)    ( ((n&0xf0)<<12) | ((n&0xf00)) | ((n&0xf)<<24) | 0x30303052)

Convert BCD version number into version word.

Definition at line 300 of file hpgcc_config.h.

#define RESERVE_TEMPOB (   a)    (a&0xff)

Instruct the launcher to reserve memory (kbytes) for TEMPOB growth.

Definition at line 291 of file hpgcc_config.h.

#define RESERVE_USEROB (   a)    ((a&0xff)<<8)

Instruct the launcher to reserve memory for stack and USEROB growth.

Definition at line 296 of file hpgcc_config.h.

#define ROMLIB_BUILD   0x003

Activate patch for broken kos_fopen() mode "a" workaround.

The kos_fopen() is broken when called with the "a" (append) mode paramter, in that respect, that it doesn't create the file, if it doesn't exist. This define controls the workaround patch. Set to 1 to activate.

ROMLib build number

Minimum ROMLib build number required to execute. This number is increased by 1 every time a new ROM is released. Max. count is 999. The number is packed BCD (0x000 to 0x999)

Definition at line 261 of file hpgcc_config.h.

#define USE_ERAM   0x00020000

Instruct the launcher to allocate and use ERAM for the heap.

Definition at line 282 of file hpgcc_config.h.

#define USE_KOSRAM   0x00040000

Instruct the launcher to allocate and use KOS ram for the heap.

Definition at line 287 of file hpgcc_config.h.

#define USE_MAINRAM   0x00010000

Instruct the launcher to allocate and use main ram for the heap.

Definition at line 278 of file hpgcc_config.h.