2
0

sys.h 978 B

12345678910111213141516171819202122232425262728293031323334
  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 IRQSTACK_SIZE 1024 /* Interrupt stack size */
  19. #define IRQSTACK_TOP STACK_BOTTOM
  20. #define IRQSTACK_BOTTOM (IRQSTACK_TOP - IRQSTACK_SIZE)
  21. #define SDRAM_SIZE (0x1 << SDRAM_BITS)
  22. #define SDRAM_MASK (SDRAM_SIZE - 1)
  23. #define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE)
  24. /* Starting offset in flash for non-FPGA use */
  25. #define ROM_OFFSET 0x100000
  26. #endif /* SYS_H */