2
0

sys.h 833 B

123456789101112131415161718192021222324252627282930
  1. #ifndef SYS_H
  2. #define SYS_H
  3. /*
  4. * Various constants that need to match the hardware configuration.
  5. * This file must be includable from assembly and from a linker script.
  6. *
  7. * The base constants should be defined in iodevs.conf; this file contains
  8. * derived constants.
  9. */
  10. #include "compiler.h"
  11. #include "iodevs.h"
  12. #define SRAM_SIZE (0x1 << SRAM_BITS)
  13. #define SRAM_MASK (SRAM_SIZE - 1)
  14. #define SRAM_END (SRAM_ADDR + SRAM_SIZE)
  15. #define STACK_SIZE 2048 /* Minimum stack size */
  16. #define STACK_TOP SRAM_END /* Initial stack pointer */
  17. #define STACK_BOTTOM (STACK_TOP - STACK_SIZE)
  18. #define SDRAM_SIZE (0x1 << SDRAM_BITS)
  19. #define SDRAM_MASK (SDRAM_SIZE - 1)
  20. #define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE)
  21. /* Starting offset in flash for non-FPGA use */
  22. #define ROM_OFFSET 0x100000
  23. #endif /* SYS_H */