Advertisement
uaa

uARM/chokanji diff (work-in-progress)

uaa
Apr 29th, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. --- /dev/null Mon Apr 29 23:12:18 2013
  2. +++ Makefile-brightv Mon Apr 29 22:51:26 2013
  3. @@ -0,0 +1,65 @@
  4. +# How to use
  5. +#
  6. +# $ mkdir $(BD)/unix/uarm
  7. +# $ cd $(BD)/unix/uarm
  8. +# $ wget https://github.com/syuu1228/uARM/archive/master.zip
  9. +# $ unzip -x master.zip
  10. +# $ ln -s uARM-master src
  11. +# $ mkdir pcat
  12. +# $ cd pcat
  13. +# $ ln -s ../src/Makefile-brightv Makefile
  14. +# $ gmake
  15. +
  16. +DEPS = Dependencies
  17. +DEPENDENCIES_OUTPUT := $(DEPS)
  18. +
  19. +include ../../etc/makerules
  20. +
  21. +TARGET = uARM
  22. +
  23. +S = ../src
  24. +VPATH = $S
  25. +
  26. +HEADER := $(S) $(HEADER)
  27. +
  28. +SRC = main_pc.c
  29. +SRC += rt.c math64.c CPU.c MMU.c cp14.c cp15.c mem.c RAM.c callout_RAM.c SoC.c pxa255_IC.c icache.c pxa255_TIMR.c pxa255_RTC.c pxa255_UART.c pxa255_PwrClk.c pxa255_GPIO.c pxa255_DMA.c pxa255_DSP.c pxa255_LCD.c
  30. +
  31. +OBJ = $(addsuffix .o, $(basename $(SRC)))
  32. +WC_SRC = $(filter %.C, $(SRC))
  33. +
  34. +LOADLIBES = -lapp
  35. +
  36. +ifneq ($(mode), debug)
  37. + CFLAGS += -Wall
  38. +endif
  39. +CFLAGS += -D_BRIGHTV_
  40. +
  41. +#-----------------------------------------------------------------------------
  42. +.PHONY: all install clean
  43. +
  44. +ALL = $(TARGET) $(addsuffix .map, $(TARGET))
  45. +
  46. +all: $(ALL)
  47. +
  48. +$(TARGET): $(OBJ)
  49. + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION)
  50. +
  51. +clean:
  52. + $(RM) $(OBJ) $(WC_SRC:%.C=%.c) $(ALL) $(DEPS)
  53. +
  54. +install: $(addprefix $(EXE_INSTALLDIR)/, $(ALL))
  55. +
  56. +$(TARGET:%=$(EXE_INSTALLDIR)/%): $(EXE_INSTALLDIR)/%: %
  57. + $(EXE_INSTALL_STRIP)
  58. +
  59. +$(WC_SRC:%.C=%.c):
  60. +
  61. +$(OBJ):
  62. +
  63. +ifdef DEPENDENCIES_OUTPUT
  64. + $(DEPS): ; touch $(DEPS)
  65. +else
  66. + $(DEPS): $(SRC) ; $(MAKEDEPS) $@ $?
  67. +endif
  68. +include $(DEPS)
  69. --- types.h.orig Mon Apr 29 18:07:51 2013
  70. +++ types.h Mon Apr 29 22:43:48 2013
  71. @@ -1,6 +1,18 @@
  72. #ifndef _TYPES_H_
  73. #define _TYPES_H_
  74.  
  75. +#if defined(_BRIGHTV_)
  76. +#include <typedef.h>
  77. +
  78. +typedef UW UInt32;
  79. +typedef W Int32;
  80. +typedef UH UInt16;
  81. +typedef H Int16;
  82. +typedef UB UInt8;
  83. +typedef B Int8;
  84. +typedef UB Err;
  85. +typedef UB Boolean;
  86. +#else
  87. #include <stdint.h>
  88.  
  89. typedef uint32_t UInt32;
  90. @@ -11,6 +23,7 @@
  91. typedef int8_t Int8;
  92. typedef unsigned char Err;
  93. typedef unsigned char Boolean;
  94. +#endif
  95.  
  96. #define true 1
  97. #define false 0
  98. @@ -47,6 +60,12 @@
  99. #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
  100. #include <sys/endian.h>
  101. #endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
  102. +
  103. +#if defined(_BRIGHTV_)
  104. +#include <machine/endian.h>
  105. +#define fseeko(stream, offset, whence) fseek(stream, offset, whence)
  106. +#define ftello(stream) ftell(stream)
  107. +#endif
  108.  
  109. #ifndef LITTLE_ENDIAN
  110. #define LITTLE_ENDIAN (0xAABBCCDDUL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement