├── CartReaderApp
├── Output
│ └── Debug
│ │ └── Obj
│ │ └── GDCartReader
│ │ ├── Common-3bab6b7c.o.tmp
│ │ ├── Common-fe735770.o.tmp
│ │ ├── GB.o
│ │ ├── GBA.o
│ │ ├── GBM.o
│ │ ├── ff.o
│ │ ├── Common.o
│ │ ├── diskio.o
│ │ ├── main.o
│ │ ├── sdcard.o
│ │ ├── Display.o
│ │ ├── Operate.o
│ │ ├── ffsystem.o
│ │ ├── ffunicode.o
│ │ ├── flashparam.o
│ │ ├── gd32f10x_dma.o
│ │ ├── gd32f10x_fmc.o
│ │ ├── gd32f10x_gpio.o
│ │ ├── gd32f10x_i2c.o
│ │ ├── gd32f10x_rcu.o
│ │ ├── gd32f10x_sdio.o
│ │ ├── GD32F10x_Startup.o
│ │ ├── system_gd32f10x.o
│ │ ├── SEGGER_THUMB_Startup.o
│ │ ├── gd32f10x_hd_Vectors.o
│ │ ├── GD32F10x_Startup.d
│ │ ├── SEGGER_THUMB_Startup.d
│ │ ├── gd32f10x_hd_Vectors.d
│ │ ├── ffsystem.d
│ │ ├── ffunicode.d
│ │ ├── ff.d
│ │ ├── GDCartReader.ind
│ │ ├── gd32f10x_dma.d
│ │ ├── gd32f10x_fmc.d
│ │ ├── gd32f10x_i2c.d
│ │ ├── gd32f10x_rcu.d
│ │ ├── gd32f10x_gpio.d
│ │ ├── system_gd32f10x.d
│ │ ├── gd32f10x_sdio.d
│ │ ├── flashparam.d
│ │ ├── sdcard.d
│ │ ├── Common.d
│ │ ├── Display.d
│ │ ├── diskio.d
│ │ ├── Operate.d
│ │ ├── GBA.d
│ │ ├── GBM.d
│ │ ├── GB.d
│ │ └── main.d
├── fat_fs
│ ├── inc
│ │ ├── fattime.h
│ │ ├── integer.h
│ │ └── diskio.h
│ ├── src
│ │ ├── fattime.c
│ │ ├── option
│ │ │ └── syncobj.c
│ │ └── diskio.c
│ └── readme.txt
├── GD32F10x
│ ├── Device
│ │ ├── Source
│ │ │ ├── gd32f10x_fmc.c
│ │ │ ├── gd32f10x_crc.c
│ │ │ ├── gd32f10x_wwdgt.c
│ │ │ └── gd32f10x_fwdgt.c
│ │ └── Include
│ │ │ ├── gd32f10x_libopt.h
│ │ │ ├── RTE_Components.h
│ │ │ ├── system_gd32f10x.h
│ │ │ ├── gd32f10x_crc.h
│ │ │ ├── gd32f10x_wwdgt.h
│ │ │ └── gd32f10x_misc.h
│ ├── XML
│ │ ├── GD32F101C4_MemoryMap.xml
│ │ ├── GD32F101C6_MemoryMap.xml
│ │ ├── GD32F101C8_MemoryMap.xml
│ │ ├── GD32F101CB_MemoryMap.xml
│ │ ├── GD32F101R4_MemoryMap.xml
│ │ ├── GD32F101R6_MemoryMap.xml
│ │ ├── GD32F101R8_MemoryMap.xml
│ │ ├── GD32F101RB_MemoryMap.xml
│ │ ├── GD32F101RC_MemoryMap.xml
│ │ ├── GD32F101RD_MemoryMap.xml
│ │ ├── GD32F101RE_MemoryMap.xml
│ │ ├── GD32F101RF_MemoryMap.xml
│ │ ├── GD32F101RG_MemoryMap.xml
│ │ ├── GD32F101RI_MemoryMap.xml
│ │ ├── GD32F101RK_MemoryMap.xml
│ │ ├── GD32F101T4_MemoryMap.xml
│ │ ├── GD32F101T6_MemoryMap.xml
│ │ ├── GD32F101T8_MemoryMap.xml
│ │ ├── GD32F101TB_MemoryMap.xml
│ │ ├── GD32F101V8_MemoryMap.xml
│ │ ├── GD32F101VB_MemoryMap.xml
│ │ ├── GD32F101VC_MemoryMap.xml
│ │ ├── GD32F101VD_MemoryMap.xml
│ │ ├── GD32F101VE_MemoryMap.xml
│ │ ├── GD32F101VF_MemoryMap.xml
│ │ ├── GD32F101VG_MemoryMap.xml
│ │ ├── GD32F101VI_MemoryMap.xml
│ │ ├── GD32F101VK_MemoryMap.xml
│ │ ├── GD32F101ZC_MemoryMap.xml
│ │ ├── GD32F101ZD_MemoryMap.xml
│ │ ├── GD32F101ZE_MemoryMap.xml
│ │ ├── GD32F101ZF_MemoryMap.xml
│ │ ├── GD32F101ZG_MemoryMap.xml
│ │ ├── GD32F101ZI_MemoryMap.xml
│ │ ├── GD32F101ZK_MemoryMap.xml
│ │ ├── GD32F103C4_MemoryMap.xml
│ │ ├── GD32F103C6_MemoryMap.xml
│ │ ├── GD32F103C8_MemoryMap.xml
│ │ ├── GD32F103CB_MemoryMap.xml
│ │ ├── GD32F103R4_MemoryMap.xml
│ │ ├── GD32F103R6_MemoryMap.xml
│ │ ├── GD32F103R8_MemoryMap.xml
│ │ ├── GD32F103RB_MemoryMap.xml
│ │ ├── GD32F103RC_MemoryMap.xml
│ │ ├── GD32F103RD_MemoryMap.xml
│ │ ├── GD32F103RE_MemoryMap.xml
│ │ ├── GD32F103RF_MemoryMap.xml
│ │ ├── GD32F103RG_MemoryMap.xml
│ │ ├── GD32F103RI_MemoryMap.xml
│ │ ├── GD32F103RK_MemoryMap.xml
│ │ ├── GD32F103T4_MemoryMap.xml
│ │ ├── GD32F103T6_MemoryMap.xml
│ │ ├── GD32F103T8_MemoryMap.xml
│ │ ├── GD32F103TB_MemoryMap.xml
│ │ ├── GD32F103V8_MemoryMap.xml
│ │ ├── GD32F103VB_MemoryMap.xml
│ │ ├── GD32F103VC_MemoryMap.xml
│ │ ├── GD32F103VD_MemoryMap.xml
│ │ ├── GD32F103VE_MemoryMap.xml
│ │ ├── GD32F103VF_MemoryMap.xml
│ │ ├── GD32F103VG_MemoryMap.xml
│ │ ├── GD32F103VI_MemoryMap.xml
│ │ ├── GD32F103VK_MemoryMap.xml
│ │ ├── GD32F103ZC_MemoryMap.xml
│ │ ├── GD32F103ZD_MemoryMap.xml
│ │ ├── GD32F103ZE_MemoryMap.xml
│ │ ├── GD32F103ZF_MemoryMap.xml
│ │ ├── GD32F103ZG_MemoryMap.xml
│ │ ├── GD32F103ZI_MemoryMap.xml
│ │ ├── GD32F103ZK_MemoryMap.xml
│ │ ├── GD32F105R8_MemoryMap.xml
│ │ ├── GD32F105RB_MemoryMap.xml
│ │ ├── GD32F105RC_MemoryMap.xml
│ │ ├── GD32F105RD_MemoryMap.xml
│ │ ├── GD32F105RE_MemoryMap.xml
│ │ ├── GD32F105RF_MemoryMap.xml
│ │ ├── GD32F105RG_MemoryMap.xml
│ │ ├── GD32F105V8_MemoryMap.xml
│ │ ├── GD32F105VB_MemoryMap.xml
│ │ ├── GD32F105VC_MemoryMap.xml
│ │ ├── GD32F105VD_MemoryMap.xml
│ │ ├── GD32F105VE_MemoryMap.xml
│ │ ├── GD32F105VF_MemoryMap.xml
│ │ ├── GD32F105VG_MemoryMap.xml
│ │ ├── GD32F105ZC_MemoryMap.xml
│ │ ├── GD32F105ZD_MemoryMap.xml
│ │ ├── GD32F105ZE_MemoryMap.xml
│ │ ├── GD32F105ZF_MemoryMap.xml
│ │ ├── GD32F105ZG_MemoryMap.xml
│ │ ├── GD32F107RB_MemoryMap.xml
│ │ ├── GD32F107RC_MemoryMap.xml
│ │ ├── GD32F107RD_MemoryMap.xml
│ │ ├── GD32F107RE_MemoryMap.xml
│ │ ├── GD32F107RF_MemoryMap.xml
│ │ ├── GD32F107RG_MemoryMap.xml
│ │ ├── GD32F107VB_MemoryMap.xml
│ │ ├── GD32F107VC_MemoryMap.xml
│ │ ├── GD32F107VD_MemoryMap.xml
│ │ ├── GD32F107VE_MemoryMap.xml
│ │ ├── GD32F107VF_MemoryMap.xml
│ │ ├── GD32F107VG_MemoryMap.xml
│ │ ├── GD32F107ZC_MemoryMap.xml
│ │ ├── GD32F107ZD_MemoryMap.xml
│ │ ├── GD32F107ZE_MemoryMap.xml
│ │ ├── GD32F107ZF_MemoryMap.xml
│ │ └── GD32F107ZG_MemoryMap.xml
│ ├── Scripts
│ │ └── GD32F10x_Target.js
│ └── Source
│ │ ├── main.cpp
│ │ └── start.s
├── main.h
├── GD32F103VC_MemoryMap.xml
├── GBA.h
├── GBM.h
├── GB.h
├── GDCartReader_Debug.jlink
├── GDCartReader_Release.jlink
├── Operate.h
├── Common.h
├── Display.h
├── CMSIS_5
│ └── CMSIS
│ │ └── Core
│ │ ├── Include
│ │ ├── cmsis_version.h
│ │ └── tz_context.h
│ │ └── Template
│ │ └── ARMv8-M
│ │ └── main_s.c
├── flashparam.h
├── fatfs
│ ├── diskio.h
│ └── ffsystem.c
├── flashparam.c
├── Common.c
└── GDCartReader.emProject
├── .github
└── workflows
│ └── build-release.yml
└── README.md
/CartReaderApp/Output/Debug/Obj/GDCartReader/Common-3bab6b7c.o.tmp:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/Common-fe735770.o.tmp:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CartReaderApp/fat_fs/inc/fattime.h:
--------------------------------------------------------------------------------
1 | #ifndef FATTIME_H_
2 |
3 | #include "integer.h"
4 |
5 | DWORD get_fattime (void);
6 |
7 | #endif
8 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/GB.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/GB.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/GBA.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/GBA.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/GBM.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/GBM.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/ff.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/ff.o
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Source/gd32f10x_fmc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/GD32F10x/Device/Source/gd32f10x_fmc.c
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/Common.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/Common.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/diskio.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/diskio.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/main.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/sdcard.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/sdcard.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/Display.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/Display.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/Operate.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/Operate.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/ffsystem.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/ffsystem.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/ffunicode.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/ffunicode.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/flashparam.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/flashparam.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_dma.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_dma.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_fmc.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_fmc.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_gpio.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_gpio.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_i2c.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_i2c.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_rcu.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_rcu.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_sdio.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_sdio.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/GD32F10x_Startup.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/GD32F10x_Startup.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/system_gd32f10x.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/system_gd32f10x.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/SEGGER_THUMB_Startup.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/SEGGER_THUMB_Startup.o
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_hd_Vectors.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HDR/Burnmaster-Firmware/HEAD/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_hd_Vectors.o
--------------------------------------------------------------------------------
/CartReaderApp/main.h:
--------------------------------------------------------------------------------
1 | #pragma ONECE
2 | /*********************************************************************
3 | *
4 | Main.h
5 |
6 | */
7 |
8 | #define enable_GBX
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/GD32F10x_Startup.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/GD32F10x_Startup.o: \
2 | J:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Source\GD32F10x_Startup.s
3 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/SEGGER_THUMB_Startup.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/SEGGER_THUMB_Startup.o: \
2 | J:\GZCSir\gbx_cart\cartflasher\CartReaderApp\SEGGER_THUMB_Startup.s
3 |
--------------------------------------------------------------------------------
/CartReaderApp/fat_fs/src/fattime.c:
--------------------------------------------------------------------------------
1 |
2 |
3 | #include "integer.h"
4 | #include "fattime.h"
5 | //#include "rtc.h" //RPi
6 |
7 | DWORD get_fattime (void)
8 | {
9 | return 0;
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_hd_Vectors.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_hd_Vectors.o: \
2 | J:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Source\gd32f10x_hd_Vectors.s
3 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F103VC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101C4_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101C6_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101C8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101CB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101R4_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101R6_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101R8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RI_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101RK_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101T4_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101T6_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101T8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101TB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101V8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VI_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101VK_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZI_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F101ZK_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103C4_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103C6_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103C8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103CB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103R4_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103R6_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103R8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RI_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103RK_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103T4_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103T6_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103T8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103TB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103V8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VI_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103VK_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZI_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F103ZK_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105R8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105RB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105RC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105RD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105RE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105RF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105RG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105V8_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105VB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105VC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105VD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105VE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105VF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105VG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105ZC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105ZD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105ZE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105ZF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F105ZG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107RB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107RC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107RD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107RE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107RF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107RG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107VB_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107VC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107VD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107VE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107VF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107VG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107ZC_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107ZD_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107ZE_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107ZF_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/XML/GD32F107ZG_MemoryMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CartReaderApp/GBA.h:
--------------------------------------------------------------------------------
1 | #ifndef _GBA_H_
2 | #define _GBA_H_
3 |
4 | #define ADDR_1 GPIOD
5 | #define ADDR_2 GPIOA
6 | #define ADDR_3 GPIOE
7 | #define CTRLGBA GPIOB
8 |
9 | #define CS_SRAM GPIO_PIN_7
10 | #define GBA_WR GPIO_PIN_13
11 | #define GBA_RD GPIO_PIN_14
12 | #define CS_ROM GPIO_PIN_15
13 |
14 | void TestMemGBA(boolean bFast);
15 | void gbaScreen();
16 |
17 | #endif
--------------------------------------------------------------------------------
/CartReaderApp/GBM.h:
--------------------------------------------------------------------------------
1 | #ifndef _GBM_H_
2 | #define _GBM_H_
3 |
4 | #define ADDRLOW GPIOD
5 | #define ADDRHIGH GPIOA
6 | #define DATA GPIOE
7 | #define CTRL GPIOB
8 |
9 | #define RST GPIO_PIN_7
10 | #define AUDIO_IN GPIO_PIN_8
11 | #define CLK GPIO_PIN_12
12 | #define WR GPIO_PIN_13
13 | #define RD GPIO_PIN_14
14 | #define CS GPIO_PIN_15
15 |
16 | void gbmScreen();
17 |
18 |
19 | #endif
--------------------------------------------------------------------------------
/CartReaderApp/GB.h:
--------------------------------------------------------------------------------
1 | #pragma onece
2 |
3 | #define ADDRLOW GPIOD
4 | #define ADDRHIGH GPIOA
5 | #define DATA GPIOE
6 | #define CTRL GPIOB
7 |
8 | #define RST GPIO_PIN_7
9 | #define AUDIO_IN GPIO_PIN_8
10 | #define CLK GPIO_PIN_12
11 | #define WR GPIO_PIN_13
12 | #define RD GPIO_PIN_14
13 | #define CS GPIO_PIN_15
14 |
15 |
16 | extern int sramBanks;
17 | extern int romBanks;
18 | extern word lastByte;
19 |
20 | void TestMemGB(boolean bFast);
21 | void gbFlashScreen();
22 | void gbScreen();
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/ffsystem.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/ffsystem.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ffsystem.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ff.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ffconf.h \
5 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h
10 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/ffunicode.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/ffunicode.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ffunicode.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ff.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ffconf.h \
5 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h
10 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/ff.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/ff.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ff.c \
3 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\string.h \
4 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
5 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
8 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ff.h \
9 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\ffconf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\diskio.h
12 |
--------------------------------------------------------------------------------
/CartReaderApp/GDCartReader_Debug.jlink:
--------------------------------------------------------------------------------
1 | [BREAKPOINTS]
2 | ForceImpTypeAny = 0
3 | ShowInfoWin = 1
4 | EnableFlashBP = 2
5 | BPDuringExecution = 0
6 | [CFI]
7 | CFISize = 0x00
8 | CFIAddr = 0x00
9 | [CPU]
10 | MonModeVTableAddr = 0xFFFFFFFF
11 | MonModeDebug = 0
12 | MaxNumAPs = 0
13 | LowPowerHandlingMode = 0
14 | OverrideMemMap = 0
15 | AllowSimulation = 1
16 | ScriptFile=""
17 | [FLASH]
18 | EraseType = 0x00
19 | CacheExcludeSize = 0x00
20 | CacheExcludeAddr = 0x00
21 | MinNumBytesFlashDL = 0
22 | SkipProgOnCRCMatch = 1
23 | VerifyDownload = 1
24 | AllowCaching = 1
25 | EnableFlashDL = 2
26 | Override = 0
27 | Device="ARM7"
28 | [GENERAL]
29 | WorkRAMSize = 0x00
30 | WorkRAMAddr = 0x00
31 | RAMUsageLimit = 0x00
32 | [SWO]
33 | SWOLogFile=""
34 | [MEM]
35 | RdOverrideOrMask = 0x00
36 | RdOverrideAndMask = 0xFFFFFFFF
37 | RdOverrideAddr = 0xFFFFFFFF
38 | WrOverrideOrMask = 0x00
39 | WrOverrideAndMask = 0xFFFFFFFF
40 | WrOverrideAddr = 0xFFFFFFFF
41 | [RAM]
42 | VerifyDownload = 0x01
43 |
--------------------------------------------------------------------------------
/CartReaderApp/GDCartReader_Release.jlink:
--------------------------------------------------------------------------------
1 | [BREAKPOINTS]
2 | ForceImpTypeAny = 0
3 | ShowInfoWin = 1
4 | EnableFlashBP = 2
5 | BPDuringExecution = 0
6 | [CFI]
7 | CFISize = 0x00
8 | CFIAddr = 0x00
9 | [CPU]
10 | MonModeVTableAddr = 0xFFFFFFFF
11 | MonModeDebug = 0
12 | MaxNumAPs = 0
13 | LowPowerHandlingMode = 0
14 | OverrideMemMap = 0
15 | AllowSimulation = 1
16 | ScriptFile=""
17 | [FLASH]
18 | EraseType = 0x00
19 | CacheExcludeSize = 0x00
20 | CacheExcludeAddr = 0x00
21 | MinNumBytesFlashDL = 0
22 | SkipProgOnCRCMatch = 1
23 | VerifyDownload = 1
24 | AllowCaching = 1
25 | EnableFlashDL = 2
26 | Override = 0
27 | Device="ARM7"
28 | [GENERAL]
29 | WorkRAMSize = 0xC000
30 | WorkRAMAddr = 0x20000000
31 | RAMUsageLimit = 0x00
32 | [SWO]
33 | SWOLogFile=""
34 | [MEM]
35 | RdOverrideOrMask = 0x00
36 | RdOverrideAndMask = 0xFFFFFFFF
37 | RdOverrideAddr = 0xFFFFFFFF
38 | WrOverrideOrMask = 0x00
39 | WrOverrideAndMask = 0xFFFFFFFF
40 | WrOverrideAddr = 0xFFFFFFFF
41 | [RAM]
42 | VerifyDownload = 0x01
43 |
--------------------------------------------------------------------------------
/CartReaderApp/Operate.h:
--------------------------------------------------------------------------------
1 | #pragma onece
2 |
3 | #define BTNNONE (0)
4 | #define BTNUP (1)
5 | #define BTNDOWN (2)
6 | #define BTNLEFT (4)
7 | #define BTNRIGHT (8)
8 | #define BTNCANCEL (16)
9 | #define BTNOK (32)
10 |
11 |
12 | #define MENU_CANCEL (0)
13 | #define MENU_1 (1)
14 | #define MENU_2 (2)
15 | #define MENU_3 (3)
16 | #define MENU_4 (4)
17 | #define MENU_5 (5)
18 | #define MENU_6 (6)
19 | #define MENU_7 (7)
20 | #define MENU_UPUP (100)
21 | #define MENU_DOWNDOWN (101)
22 | #define MENU_PGUP (102)
23 | #define MENU_PGDN (103)
24 |
25 |
26 | void KeyBrdInit();
27 | uint8_t keyState();
28 | uint8_t checkButton();
29 | void WaitOKBtn();
30 |
31 | // Display a question box with selectable answers. Make sure default choice is in (0, num_answers]
32 | unsigned char questionBox_OLED(char * question, const char* const answers[7], int num_answers, int default_choice, uint8_t rollselect, uint8_t clrSrc);
33 | uint8_t my_mkdir(char * dir);
34 | void fileBrowser(char * start_dir , const char * browserTitle);
--------------------------------------------------------------------------------
/CartReaderApp/fat_fs/inc/integer.h:
--------------------------------------------------------------------------------
1 | /*-------------------------------------------*/
2 | /* Integer type definitions for FatFs module */
3 | /*-------------------------------------------*/
4 |
5 | #ifndef _INTEGER
6 |
7 | #if 0
8 | #include
9 | #else
10 |
11 | #include "usb_conf.h"
12 |
13 | /* These types must be 16-bit, 32-bit or larger integer */
14 | typedef int INT;
15 | typedef unsigned int UINT;
16 |
17 | /* These types must be 8-bit integer */
18 | typedef signed char CHAR;
19 | typedef unsigned char UCHAR;
20 | typedef unsigned char BYTE;
21 |
22 | /* These types must be 16-bit integer */
23 | typedef short SHORT;
24 | typedef unsigned short USHORT;
25 | typedef unsigned short WORD;
26 | typedef unsigned short WCHAR;
27 |
28 | /* These types must be 32-bit integer */
29 | typedef long LONG;
30 | typedef unsigned long ULONG;
31 | typedef unsigned long DWORD;
32 |
33 | /* Boolean type */
34 | // typedef enum { FALSE = 0, TRUE } BOOL;
35 | #include
36 | //typedef bool BOOL;
37 | #ifndef FALSE
38 | #define FALSE false
39 | #define TRUE true
40 | #endif
41 |
42 |
43 | #endif
44 |
45 | #define _INTEGER
46 | #endif
47 |
--------------------------------------------------------------------------------
/.github/workflows/build-release.yml:
--------------------------------------------------------------------------------
1 | name: Build Firmware
2 | on:
3 | workflow_dispatch:
4 | push:
5 | branches:
6 | - 'main'
7 |
8 | jobs:
9 | build:
10 | runs-on: ubuntu-22.04
11 | steps:
12 | - name: Checkout Burnmaster-Firmware
13 | uses: actions/checkout@v3
14 | with:
15 | path: Burnmaster-Firmware
16 |
17 | - name: Install EmeddedStudio
18 | run: |
19 | wget https://www.segger.com/downloads/embedded-studio/Setup_EmbeddedStudio_ARM_v622a_linux_x64.tar.gz
20 | tar -xvf Setup_EmbeddedStudio_ARM_v622a_linux_x64.tar.gz
21 | cd arm_segger_embedded_studio_v622a_linux_x64/
22 | sudo ./install_segger_embedded_studio --minimal-install --accept-license --copy-files-to .
23 |
24 | - name: Compile Firmware
25 | run: |
26 | cd arm_segger_embedded_studio_v622a_linux_x64/bin
27 | ./emBuild -config "Debug" ${{ github.workspace }}//Burnmaster-Firmware/CartReaderApp/GDCartReader.emProject
28 |
29 | - uses: actions/upload-artifact@v3
30 | with:
31 | name: Burnmaster-Firmware
32 | path: ${{ github.workspace }}//Burnmaster-Firmware/CartReaderApp/Output/Debug/Exe/GDCartReader.bin
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Funnyplaying Burnmaster Firmware
2 |
3 | Based on Sanni's [cartreader](https://github.com/sanni/cartreader) firmware
4 |
5 |
6 | ## Building the firmware
7 | **Requires [SEGGER Embedded Studio (6.22a recommended)](https://www.segger.com/products/development-tools/embedded-studio/)**
8 |
9 | To build the firmware open `GDCartReader.emProject` in Embedded Studio, then right click `Project 'GDCartReader'` and click `Build` the compiled firmware can be found at `ProjectFolder/Debug/Exe/GDCartReader.bin`, you will need to rename this file to `update.bin` which can now be put at the root of your SD Card to update your BurnMaster
10 |
11 | **Alternatively** you can simply clone this repository and make your changes, Github will automatically build your firmware (See Actions Tab)
12 |
13 | ### Repository Notes:
14 |
15 | This repository is setup to auto-build the firmware when a commit is made, builds can be found under the [Actions tab](https://github.com/HDR/Burnmaster-Firmware/actions), this makes it really easy to fork this repository and make your own changes without having to download Segger Embedded Studio
16 |
17 |
18 | This source code is provided directly by funnyplaying, i have nothing to do with the development of the firmware.
19 |
20 | **Note:** Be aware that the source code is for 1.10 and not 1.12 as i have not recieved the source code for the latest version from FunnyPlaying.
21 |
--------------------------------------------------------------------------------
/CartReaderApp/Common.h:
--------------------------------------------------------------------------------
1 | #ifndef _COMMON_H_
2 | #define _COMMON_H_
3 |
4 | #include
5 | #include
6 | #include
7 | #include "Display.h"
8 | #include "Operate.h"
9 | #include "fatfs/ff.h"
10 |
11 |
12 |
13 | #define byte uint8_t
14 | #define word uint16_t
15 | #define boolean uint8_t
16 | #define bool uint8_t
17 | #define true (1)
18 | #define false (0)
19 |
20 |
21 | #define FILENAME_LENGTH 64
22 | #define FILEPATH_LENGTH 128
23 | #define FILEOPTS_LENGTH 20
24 |
25 |
26 | extern int foldern;
27 | extern char folder[36];
28 | extern FATFS fs;
29 |
30 | extern char fileName[FILENAME_LENGTH];
31 | extern char filePath[FILEPATH_LENGTH];
32 | extern byte currPage;
33 | extern byte lastPage;
34 | extern byte numPages;
35 | extern boolean root;
36 | extern boolean filebrowse;
37 | extern bool errorLvl;
38 | extern boolean ignoreError;
39 | extern char flashid[5];
40 |
41 | // Variable to count errors
42 | extern unsigned long writeErrors;
43 |
44 |
45 | extern char romName[64];
46 | extern unsigned long sramSize;
47 | extern int romType;
48 | extern byte saveType;
49 | extern word romSize;
50 | extern word numBanks;
51 | extern char checksumStr[5];
52 |
53 |
54 | //SD Card
55 | extern byte sdBuffer[512];
56 |
57 |
58 | int getSystick();
59 | void SysClockInit();
60 | void SysTick_Handler(void);
61 | void delay(int n);
62 | void ResetSystem();
63 | void SysClockFree();
64 |
65 | void delayMicroseconds(uint16_t us);
66 |
67 | #endif
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/GDCartReader.ind:
--------------------------------------------------------------------------------
1 | "Output/Debug/Obj/GDCartReader/system_gd32f10x.o"
2 | "Output/Debug/Obj/GDCartReader/main.o"
3 | "Output/Debug/Obj/GDCartReader/diskio.o"
4 | "Output/Debug/Obj/GDCartReader/ff.o"
5 | "Output/Debug/Obj/GDCartReader/ffsystem.o"
6 | "Output/Debug/Obj/GDCartReader/ffunicode.o"
7 | "Output/Debug/Obj/GDCartReader/sdcard.o"
8 | "Output/Debug/Obj/GDCartReader/gd32f10x_gpio.o"
9 | "Output/Debug/Obj/GDCartReader/gd32f10x_rcu.o"
10 | "Output/Debug/Obj/GDCartReader/gd32f10x_i2c.o"
11 | "Output/Debug/Obj/GDCartReader/Display.o"
12 | "Output/Debug/Obj/GDCartReader/Operate.o"
13 | "Output/Debug/Obj/GDCartReader/Common.o"
14 | "Output/Debug/Obj/GDCartReader/GB.o"
15 | "Output/Debug/Obj/GDCartReader/gd32f10x_sdio.o"
16 | "Output/Debug/Obj/GDCartReader/gd32f10x_dma.o"
17 | "Output/Debug/Obj/GDCartReader/flashparam.o"
18 | "Output/Debug/Obj/GDCartReader/gd32f10x_fmc.o"
19 | "Output/Debug/Obj/GDCartReader/GBA.o"
20 | "Output/Debug/Obj/GDCartReader/GBM.o"
21 | "Output/Debug/Obj/GDCartReader/SEGGER_THUMB_Startup.o"
22 | "Output/Debug/Obj/GDCartReader/GD32F10x_Startup.o"
23 | "Output/Debug/Obj/GDCartReader/gd32f10x_hd_Vectors.o"
24 | "J:/SEGGER/SEGGER Embedded Studio for ARM 6.22a/lib/libc_v7m_t_le_eabi_balanced.a"
25 | "J:/SEGGER/SEGGER Embedded Studio for ARM 6.22a/lib/SEGGER_crtinit_v7m_little.o"
26 | "J:/SEGGER/SEGGER Embedded Studio for ARM 6.22a/lib/prinops_rtt_v7m_little.a"
27 | "J:/SEGGER/SEGGER Embedded Studio for ARM 6.22a/lib/heapops_basic_v7m_little.a"
28 |
--------------------------------------------------------------------------------
/CartReaderApp/Display.h:
--------------------------------------------------------------------------------
1 | #pragma onece
2 |
3 | #define I2C1_SLAVE_ADDRESS7 0x78
4 | #define SSD1306_ADDR 0x3c
5 | #define MAX_COLUMN 128
6 |
7 | #define LED1 (1)
8 | #define LED_B (2)
9 | #define LED_G (4)
10 | #define LED_R (8)
11 |
12 |
13 |
14 | void I2cInit(void);
15 | void SSD1306_WriteCmd(uint8_t var);
16 | void SSD1306_WriteData(uint8_t var);
17 |
18 |
19 |
20 | //坐标设置:也就是在哪里显示
21 | void OledSetPos(uint8_t x, uint8_t y);
22 | //开启Oled显示
23 | void OledDisplayOn(void);
24 | //关闭Oled显示
25 | void OledDisplayOff(void);
26 | //清屏函数,清完屏,整个屏幕是黑色的!和没点亮一样
27 | void OledClear(void);
28 | //在指定位置显示一个字符,包括部分字符
29 | //x:0~127,y:0~7
30 | //Char_Size:选择字体 16/12
31 | void OledShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t Char_Size);
32 | //显示一个字符串
33 | uint8_t OledShowString(uint8_t x,uint8_t y,char *str,uint8_t Char_Size);
34 | //显示一个位图
35 | void OledShowPicData(uint8_t x,uint8_t y,uint8_t wdt,uint8_t hgt,uint8_t *pPicData);
36 | //初始化
37 | void OledInit(void);
38 |
39 |
40 |
41 | void setColor_RGB(uint8_t r, uint8_t g, uint8_t b);
42 | void print_Error(char *errorMessage, uint8_t forceReset);
43 | void draw_progressbar(uint32_t processed, uint32_t total, uint8_t line);
44 | void showPersent(uint32_t processed, uint32_t total, uint8_t x, uint8_t line);
45 |
46 |
47 |
48 |
49 | //Leds
50 | void LEDSInit();
51 | void LED_ON(uint8_t LedNum);
52 | void LED_OFF(uint8_t LedNum);
53 | void LED_BLINK(uint8_t LedNum);
54 | void LED_CLEAR(void);
55 |
56 | #define LED_RED_ON LED_ON(LED_R)
57 | #define LED_GREEN_ON LED_ON(LED_G)
58 | #define LED_BLUE_ON LED_ON(LED_B)
59 | #define LED_RED_OFF LED_OFF(LED_R)
60 | #define LED_GREEN_OFF LED_OFF(LED_G)
61 | #define LED_BLUE_OFF LED_OFF(LED_B)
62 | #define LED_RED_BLINK LED_BLINK(LED_R)
63 | #define LED_GREEN_BLINK LED_BLINK(LED_G)
64 | #define LED_BLUE_BLINK LED_BLINK(LED_B)
--------------------------------------------------------------------------------
/CartReaderApp/CMSIS_5/CMSIS/Core/Include/cmsis_version.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file cmsis_version.h
3 | * @brief CMSIS Core(M) Version definitions
4 | * @version V5.0.4
5 | * @date 23. July 2019
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2009-2019 ARM Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #if defined ( __ICCARM__ )
26 | #pragma system_include /* treat file as system include file for MISRA check */
27 | #elif defined (__clang__)
28 | #pragma clang system_header /* treat file as system include file */
29 | #endif
30 |
31 | #ifndef __CMSIS_VERSION_H
32 | #define __CMSIS_VERSION_H
33 |
34 | /* CMSIS Version definitions */
35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
36 | #define __CM_CMSIS_VERSION_SUB ( 4U) /*!< [15:0] CMSIS Core(M) sub version */
37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
39 | #endif
40 |
--------------------------------------------------------------------------------
/CartReaderApp/flashparam.h:
--------------------------------------------------------------------------------
1 | #ifndef __FLASH_PARAM_H__
2 | #define __FLASH_PARAM_H__
3 |
4 | #include
5 |
6 | #ifdef __cplusplus
7 | extern "C"{
8 | #endif /* __cplusplus */
9 |
10 |
11 | #define FMC_PAGE_SIZE ((uint16_t)0x400U)
12 | #define FMC_WRITE_START_ADDR ((uint32_t)0x0803FC00U)
13 | #define FMC_WRITE_END_ADDR ((uint32_t)0x0803FFFFU)
14 |
15 |
16 | void save_dword(uint32_t data);
17 | uint32_t load_dword();
18 |
19 |
20 |
21 | /* 需要保存的参数
22 | typedef struct _CONFIG_PARAMS
23 | {
24 | unsigned char data_valid_flag; //数据有效标志 0xF1:有效 其它:无效
25 | unsigned char sleep_flag; //是否进入休眠标志 0:不进入 1:进入
26 | unsigned char open_direction; //开门方向 0:左开门 1:右开门
27 | int16_t x_value; //地磁X轴方向值
28 | int16_t y_value; //地磁Y轴方向值
29 | int16_t z_value; //地磁Z轴方向值
30 | uint32_t tmp_password_flag; //临时密码使用标志
31 | unsigned char user_flag[50]; //当前有效用户标记
32 | unsigned char password_table[50][7]; //用户密码数组
33 | }CONFIG_PARAMS;
34 |
35 |
36 | // 系统状态信息
37 | typedef struct _SYS_STATUS
38 | {
39 | unsigned char door_state; //门磁状态 0:关门 1:开门
40 | unsigned char auto_anti_lock; //自动反锁配置 0:不自动反锁 1:自动反锁
41 | unsigned char quiet_flag; //自动反锁配置 0:音频正常播放 1:部分音频静音
42 | unsigned char opto1_state; //光耦1状态
43 | unsigned char opto2_state; //光耦2状态
44 | unsigned char opto3_state; //光耦3状态
45 | float battery_volatage; //电池电压 0-5V
46 | }SYS_STATUS;
47 |
48 |
49 | typedef union _CONFIG_PARAMS_UNION
50 | {
51 | CONFIG_PARAMS config_params; // 360字节
52 | uint32_t data[104]; //用于通过联合体字节对齐,方便数据存储 104*4=416字节
53 | }CONFIG_PARAMS_UNION;
54 |
55 |
56 | extern int load_config_params(void);
57 |
58 | extern CONFIG_PARAMS *get_config_params(void);
59 |
60 | extern int is_config_params_avaliable(void);
61 |
62 | extern int save_config_params(CONFIG_PARAMS *params);
63 |
64 | */
65 |
66 |
67 | #ifdef __cplusplus
68 | }
69 | #endif /* __cplusplus */
70 |
71 | #endif
--------------------------------------------------------------------------------
/CartReaderApp/fat_fs/inc/diskio.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------
2 | / Low level disk interface modlue include file R0.07 (C)ChaN, 2009
3 | /-----------------------------------------------------------------------*/
4 |
5 | #ifndef _DISKIO
6 |
7 | #define _READONLY 0 /* 1: Read-only mode */
8 | #define _USE_IOCTL 1
9 |
10 | #include "integer.h"
11 |
12 | /* Status of Disk Functions */
13 | typedef BYTE DSTATUS;
14 |
15 | /* Results of Disk Functions */
16 | typedef enum {
17 | RES_OK = 0, /* 0: Successful */
18 | RES_ERROR, /* 1: R/W Error */
19 | RES_WRPRT, /* 2: Write Protected */
20 | RES_NOTRDY, /* 3: Not Ready */
21 | RES_PARERR /* 4: Invalid Parameter */
22 | } DRESULT;
23 |
24 |
25 | /*---------------------------------------*/
26 | /* Prototypes for disk control functions */
27 |
28 | bool assign_drives (int argc, char *argv[]);
29 | DSTATUS disk_initialize (BYTE);
30 | DSTATUS disk_status (BYTE);
31 | DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
32 | #if _READONLY == 0
33 | DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
34 | #endif
35 | DRESULT disk_ioctl (BYTE, BYTE, void*);
36 |
37 |
38 |
39 | /* Disk Status Bits (DSTATUS) */
40 |
41 | #define STA_NOINIT 0x01 /* Drive not initialized */
42 | #define STA_NODISK 0x02 /* No medium in the drive */
43 | #define STA_PROTECT 0x04 /* Write protected */
44 |
45 |
46 | /* Command code for disk_ioctrl() */
47 |
48 | /* Generic command */
49 | #define CTRL_SYNC 0 /* Mandatory for write functions */
50 | #define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */
51 | #define GET_SECTOR_SIZE 2
52 | #define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */
53 | #define CTRL_POWER 4
54 | #define CTRL_LOCK 5
55 | #define CTRL_EJECT 6
56 | /* MMC/SDC command */
57 | #define MMC_GET_TYPE 10
58 | #define MMC_GET_CSD 11
59 | #define MMC_GET_CID 12
60 | #define MMC_GET_OCR 13
61 | #define MMC_GET_SDSTAT 14
62 | /* ATA/CF command */
63 | #define ATA_GET_REV 20
64 | #define ATA_GET_MODEL 21
65 | #define ATA_GET_SN 22
66 |
67 | #define _DISKIO
68 | #endif
69 |
--------------------------------------------------------------------------------
/CartReaderApp/CMSIS_5/CMSIS/Core/Template/ARMv8-M/main_s.c:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * @file main_s.c
3 | * @brief Code template for secure main function
4 | * @version V1.1.1
5 | * @date 10. January 2018
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2013-2018 Arm Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | /* Use CMSE intrinsics */
26 | #include
27 |
28 | #include "RTE_Components.h"
29 | #include CMSIS_device_header
30 |
31 | /* TZ_START_NS: Start address of non-secure application */
32 | #ifndef TZ_START_NS
33 | #define TZ_START_NS (0x200000U)
34 | #endif
35 |
36 | /* typedef for non-secure callback functions */
37 | typedef void (*funcptr_void) (void) __attribute__((cmse_nonsecure_call));
38 |
39 | /* Secure main() */
40 | int main(void) {
41 | funcptr_void NonSecure_ResetHandler;
42 |
43 | /* Add user setup code for secure part here*/
44 |
45 | /* Set non-secure main stack (MSP_NS) */
46 | __TZ_set_MSP_NS(*((uint32_t *)(TZ_START_NS)));
47 |
48 | /* Get non-secure reset handler */
49 | NonSecure_ResetHandler = (funcptr_void)(*((uint32_t *)((TZ_START_NS) + 4U)));
50 |
51 | /* Start non-secure state software application */
52 | NonSecure_ResetHandler();
53 |
54 | /* Non-secure software does not return, this code is not executed */
55 | while (1) {
56 | __NOP();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Include/gd32f10x_libopt.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017 GigaDevice
3 |
4 | 2017-03-13, V1.0.0, firmware for GD32F10x
5 | */
6 |
7 | #ifndef GD32F10X_LIBOPT_H
8 | #define GD32F10X_LIBOPT_H
9 |
10 | /* Comment the line below to disable peripheral header file inclusion */
11 | #include "RTE_Components.h"
12 |
13 | #ifdef RTE_DEVICE_STDPERIPHERALS_ADC
14 | #include "gd32f10x_adc.h"
15 | #endif
16 | #ifdef RTE_DEVICE_STDPERIPHERALS_BKP
17 | #include "gd32f10x_bkp.h"
18 | #endif
19 | #ifdef RTE_DEVICE_STDPERIPHERALS_CAN
20 | #include "gd32f10x_can.h"
21 | #endif
22 | #ifdef RTE_DEVICE_STDPERIPHERALS_CRC
23 | #include "gd32f10x_crc.h"
24 | #endif
25 | #ifdef RTE_DEVICE_STDPERIPHERALS_DAC
26 | #include "gd32f10x_dac.h"
27 | #endif
28 | #ifdef RTE_DEVICE_STDPERIPHERALS_DBG
29 | #include "gd32f10x_dbg.h"
30 | #endif
31 | #ifdef RTE_DEVICE_STDPERIPHERALS_DMA
32 | #include "gd32f10x_dma.h"
33 | #endif
34 | #ifdef RTE_DEVICE_STDPERIPHERALS_ENET
35 | #include "gd32f10x_enet.h"
36 | #endif
37 | #ifdef RTE_DEVICE_STDPERIPHERALS_EXMC
38 | #include "gd32f10x_exmc.h"
39 | #endif
40 | #ifdef RTE_DEVICE_STDPERIPHERALS_EXTI
41 | #include "gd32f10x_exti.h"
42 | #endif
43 | #ifdef RTE_DEVICE_STDPERIPHERALS_FMC
44 | #include "gd32f10x_fmc.h"
45 | #endif
46 | #ifdef RTE_DEVICE_STDPERIPHERALS_FWDGT
47 | #include "gd32f10x_fwdgt.h"
48 | #endif
49 | #ifdef RTE_DEVICE_STDPERIPHERALS_GPIO
50 | #include "gd32f10x_gpio.h"
51 | #endif
52 | #ifdef RTE_DEVICE_STDPERIPHERALS_I2C
53 | #include "gd32f10x_i2c.h"
54 | #endif
55 | #ifdef RTE_DEVICE_STDPERIPHERALS_MISC
56 | #include "gd32f10x_misc.h"
57 | #endif
58 | #ifdef RTE_DEVICE_STDPERIPHERALS_PMU
59 | #include "gd32f10x_pmu.h"
60 | #endif
61 | #ifdef RTE_DEVICE_STDPERIPHERALS_RCU
62 | #include "gd32f10x_rcu.h"
63 | #endif
64 | #ifdef RTE_DEVICE_STDPERIPHERALS_RTC
65 | #include "gd32f10x_rtc.h"
66 | #endif
67 | #ifdef RTE_DEVICE_STDPERIPHERALS_SDIO
68 | #include "gd32f10x_sdio.h"
69 | #endif
70 | #ifdef RTE_DEVICE_STDPERIPHERALS_SPI
71 | #include "gd32f10x_spi.h"
72 | #endif
73 | #ifdef RTE_DEVICE_STDPERIPHERALS_TIMER
74 | #include "gd32f10x_timer.h"
75 | #endif
76 | #ifdef RTE_DEVICE_STDPERIPHERALS_USART
77 | #include "gd32f10x_usart.h"
78 | #endif
79 | #ifdef RTE_DEVICE_STDPERIPHERALS_WWDGT
80 | #include "gd32f10x_wwdgt.h"
81 | #endif
82 |
83 | #endif /* GD32F10X_LIBOPT_H */
84 |
85 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Include/RTE_Components.h:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | * (c) SEGGER Microcontroller GmbH *
3 | * The Embedded Experts *
4 | * www.segger.com *
5 | **********************************************************************
6 |
7 | -------------------------- END-OF-HEADER -----------------------------
8 |
9 | File : RTE_Components.h
10 | Purpose : Header file to set defines for include files
11 | */
12 |
13 | #ifndef RTE_COMPONENTS_H // Avoid multiple inclusion.
14 | #define RTE_COMPONENTS_H
15 |
16 | #if defined(__cplusplus)
17 | extern "C" { // Make sure we have C-declarations in C++ programs.
18 | #endif
19 |
20 | /*********************************************************************
21 | *
22 | * Defines, fixed
23 | *
24 | **********************************************************************
25 | */
26 |
27 | #define RTE_DEVICE_STDPERIPHERALS_ADC
28 | #define RTE_DEVICE_STDPERIPHERALS_CAN
29 | #define RTE_DEVICE_STDPERIPHERALS_CEC
30 | #define RTE_DEVICE_STDPERIPHERALS_CRC
31 | #define RTE_DEVICE_STDPERIPHERALS_CMP
32 | #define RTE_DEVICE_STDPERIPHERALS_DAC
33 | #define RTE_DEVICE_STDPERIPHERALS_DBG
34 | #define RTE_DEVICE_STDPERIPHERALS_DMA
35 | #define RTE_DEVICE_STDPERIPHERALS_EXTI
36 | #define RTE_DEVICE_STDPERIPHERALS_FMC
37 | #define RTE_DEVICE_STDPERIPHERALS_GPIO
38 | #define RTE_DEVICE_STDPERIPHERALS_SYSCFG
39 | #define RTE_DEVICE_STDPERIPHERALS_I2C
40 | #define RTE_DEVICE_STDPERIPHERALS_FWDGT
41 | #define RTE_DEVICE_STDPERIPHERALS_PMU
42 | #define RTE_DEVICE_STDPERIPHERALS_RCU
43 | #define RTE_DEVICE_STDPERIPHERALS_RTC
44 | #define RTE_DEVICE_STDPERIPHERALS_SPI
45 | #define RTE_DEVICE_STDPERIPHERALS_TIMER
46 | #define RTE_DEVICE_STDPERIPHERALS_USART
47 | #define RTE_DEVICE_STDPERIPHERALS_WWDGT
48 | #define RTE_DEVICE_STDPERIPHERALS_MISC
49 | #define RTE_DEVICE_STDPERIPHERALS_TSI
50 | #define RTE_DEVICE_STDPERIPHERALS_SLCD
51 | #define RTE_DEVICE_STDPERIPHERALS_OPA
52 | #define RTE_DEVICE_STDPERIPHERALS_IVREF
53 |
54 | #if defined(__cplusplus)
55 | } // Make sure we have C-declarations in C++ programs.
56 | #endif
57 |
58 | #endif // Avoid multiple inclusion.
59 |
60 | /*************************** End of file ****************************/
61 |
62 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Include/system_gd32f10x.h:
--------------------------------------------------------------------------------
1 | /*!
2 | \file system_gd32f10x.h
3 | \brief CMSIS Cortex-M3 Device Peripheral Access Layer Header File for
4 | GD32F10x Device Series
5 | */
6 |
7 | /*
8 | Copyright (c) 2012 ARM LIMITED
9 |
10 | All rights reserved.
11 |
12 | Redistribution and use in source and binary forms, with or without modification,
13 | are permitted provided that the following conditions are met:
14 |
15 | 1. Redistributions of source code must retain the above copyright notice, this
16 | list of conditions and the following disclaimer.
17 | 2. Redistributions in binary form must reproduce the above copyright notice,
18 | this list of conditions and the following disclaimer in the documentation
19 | and/or other materials provided with the distribution.
20 | 3. Neither the name of the copyright holder nor the names of its contributors
21 | may be used to endorse or promote products derived from this software without
22 | specific prior written permission.
23 |
24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
28 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
33 | OF SUCH DAMAGE.
34 | */
35 |
36 | /* This file refers the CMSIS standard, some adjustments are made according to GigaDevice chips */
37 |
38 | #ifndef SYSTEM_GD32F10X_H
39 | #define SYSTEM_GD32F10X_H
40 |
41 | #ifdef __cplusplus
42 | extern "C" {
43 | #endif
44 |
45 | #include
46 |
47 | /* system clock frequency (core clock) */
48 | extern uint32_t SystemCoreClock;
49 |
50 | /* function declarations */
51 | /* initialize the system and update the SystemCoreClock variable */
52 | extern void SystemInit(void);
53 | /* update the SystemCoreClock with current core clock retrieved from cpu registers */
54 | extern void SystemCoreClockUpdate(void);
55 |
56 | #ifdef __cplusplus
57 | }
58 | #endif
59 |
60 | #endif /* SYSTEM_GD32F10X_H */
61 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Scripts/GD32F10x_Target.js:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | * SEGGER Microcontroller GmbH *
3 | * The Embedded Experts *
4 | **********************************************************************
5 | * *
6 | * (c) 2014 - 2020 SEGGER Microcontroller GmbH *
7 | * *
8 | * www.segger.com Support: support@segger.com *
9 | * *
10 | **********************************************************************
11 | * *
12 | * All rights reserved. *
13 | * *
14 | * Redistribution and use in source and binary forms, with or *
15 | * without modification, are permitted provided that the following *
16 | * condition is met: *
17 | * *
18 | * - Redistributions of source code must retain the above copyright *
19 | * notice, this condition and the following disclaimer. *
20 | * *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
22 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
23 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
25 | * DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
26 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
28 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
29 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
30 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
32 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
33 | * DAMAGE. *
34 | * *
35 | *********************************************************************/
36 |
37 | function Reset() {
38 | TargetInterface.resetAndStop();
39 | }
40 |
41 | function EnableTrace(traceInterfaceType) {
42 | // TODO: Enable trace
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Source/main.cpp:
--------------------------------------------------------------------------------
1 | /*********************************************************************
2 | * SEGGER Microcontroller GmbH *
3 | * The Embedded Experts *
4 | **********************************************************************
5 | * *
6 | * (c) 2014 - 2022 SEGGER Microcontroller GmbH *
7 | * *
8 | * www.segger.com Support: support@segger.com *
9 | * *
10 | **********************************************************************
11 | * *
12 | * All rights reserved. *
13 | * *
14 | * Redistribution and use in source and binary forms, with or *
15 | * without modification, are permitted provided that the following *
16 | * condition is met: *
17 | * *
18 | * - Redistributions of source code must retain the above copyright *
19 | * notice, this condition and the following disclaimer. *
20 | * *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
22 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
23 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
25 | * DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
26 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
28 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
29 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
30 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
32 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
33 | * DAMAGE. *
34 | * *
35 | *********************************************************************/
36 |
37 | #include
38 | /*********************************************************************
39 | *
40 | * main
41 | *
42 | * Function description
43 | * Defines entry point for an GD32F10x C/C++ application.
44 | *
45 | */
46 | int main(void) {
47 | return 0;
48 | }
49 |
--------------------------------------------------------------------------------
/CartReaderApp/CMSIS_5/CMSIS/Core/Include/tz_context.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * @file tz_context.h
3 | * @brief Context Management for Armv8-M TrustZone
4 | * @version V1.0.1
5 | * @date 10. January 2018
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #if defined ( __ICCARM__ )
26 | #pragma system_include /* treat file as system include file for MISRA check */
27 | #elif defined (__clang__)
28 | #pragma clang system_header /* treat file as system include file */
29 | #endif
30 |
31 | #ifndef TZ_CONTEXT_H
32 | #define TZ_CONTEXT_H
33 |
34 | #include
35 |
36 | #ifndef TZ_MODULEID_T
37 | #define TZ_MODULEID_T
38 | /// \details Data type that identifies secure software modules called by a process.
39 | typedef uint32_t TZ_ModuleId_t;
40 | #endif
41 |
42 | /// \details TZ Memory ID identifies an allocated memory slot.
43 | typedef uint32_t TZ_MemoryId_t;
44 |
45 | /// Initialize secure context memory system
46 | /// \return execution status (1: success, 0: error)
47 | uint32_t TZ_InitContextSystem_S (void);
48 |
49 | /// Allocate context memory for calling secure software modules in TrustZone
50 | /// \param[in] module identifies software modules called from non-secure mode
51 | /// \return value != 0 id TrustZone memory slot identifier
52 | /// \return value 0 no memory available or internal error
53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module);
54 |
55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S
56 | /// \param[in] id TrustZone memory slot identifier
57 | /// \return execution status (1: success, 0: error)
58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id);
59 |
60 | /// Load secure context (called on RTOS thread context switch)
61 | /// \param[in] id TrustZone memory slot identifier
62 | /// \return execution status (1: success, 0: error)
63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id);
64 |
65 | /// Store secure context (called on RTOS thread context switch)
66 | /// \param[in] id TrustZone memory slot identifier
67 | /// \return execution status (1: success, 0: error)
68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id);
69 |
70 | #endif // TZ_CONTEXT_H
71 |
--------------------------------------------------------------------------------
/CartReaderApp/fatfs/diskio.h:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------/
2 | / Low level disk interface modlue include file (C)ChaN, 2019 /
3 | /-----------------------------------------------------------------------*/
4 |
5 | #ifndef _DISKIO_DEFINED
6 | #define _DISKIO_DEFINED
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | /* Status of Disk Functions */
13 | typedef BYTE DSTATUS;
14 |
15 | /* Results of Disk Functions */
16 | typedef enum {
17 | RES_OK = 0, /* 0: Successful */
18 | RES_ERROR, /* 1: R/W Error */
19 | RES_WRPRT, /* 2: Write Protected */
20 | RES_NOTRDY, /* 3: Not Ready */
21 | RES_PARERR /* 4: Invalid Parameter */
22 | } DRESULT;
23 |
24 |
25 | /*---------------------------------------*/
26 | /* Prototypes for disk control functions */
27 |
28 | DWORD get_fattime(void);
29 | DSTATUS disk_initialize (BYTE pdrv);
30 | DSTATUS disk_status (BYTE pdrv);
31 | DRESULT disk_read (BYTE pdrv, BYTE* buff, LBA_t sector, UINT count);
32 | DRESULT disk_write (BYTE pdrv, const BYTE* buff, LBA_t sector, UINT count);
33 | DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
34 |
35 |
36 | /* Disk Status Bits (DSTATUS) */
37 | #define STA_OK 0x00
38 | #define STA_NOINIT 0x01 /* Drive not initialized */
39 | #define STA_NODISK 0x02 /* No medium in the drive */
40 | #define STA_PROTECT 0x04 /* Write protected */
41 |
42 |
43 | /* Command code for disk_ioctrl fucntion */
44 |
45 | /* Generic command (Used by FatFs) */
46 | #define CTRL_SYNC 0 /* Complete pending write process (needed at FF_FS_READONLY == 0) */
47 | #define GET_SECTOR_COUNT 1 /* Get media size (needed at FF_USE_MKFS == 1) */
48 | #define GET_SECTOR_SIZE 2 /* Get sector size (needed at FF_MAX_SS != FF_MIN_SS) */
49 | #define GET_BLOCK_SIZE 3 /* Get erase block size (needed at FF_USE_MKFS == 1) */
50 | #define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at FF_USE_TRIM == 1) */
51 |
52 | /* Generic command (Not used by FatFs) */
53 | #define CTRL_POWER 5 /* Get/Set power status */
54 | #define CTRL_LOCK 6 /* Lock/Unlock media removal */
55 | #define CTRL_EJECT 7 /* Eject media */
56 | #define CTRL_FORMAT 8 /* Create physical format on the media */
57 |
58 | /* MMC/SDC specific ioctl command */
59 | #define MMC_GET_TYPE 10 /* Get card type */
60 | #define MMC_GET_CSD 11 /* Get CSD */
61 | #define MMC_GET_CID 12 /* Get CID */
62 | #define MMC_GET_OCR 13 /* Get OCR */
63 | #define MMC_GET_SDSTAT 14 /* Get SD status */
64 | #define ISDIO_READ 55 /* Read data form SD iSDIO register */
65 | #define ISDIO_WRITE 56 /* Write data to SD iSDIO register */
66 | #define ISDIO_MRITE 57 /* Masked write data to SD iSDIO register */
67 |
68 | /* ATA/CF specific ioctl command */
69 | #define ATA_GET_REV 20 /* Get F/W revision */
70 | #define ATA_GET_MODEL 21 /* Get model name */
71 | #define ATA_GET_SN 22 /* Get serial number */
72 |
73 | #ifdef __cplusplus
74 | }
75 | #endif
76 |
77 | #endif
78 |
--------------------------------------------------------------------------------
/CartReaderApp/flashparam.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include "flashparam.h"
5 |
6 |
7 |
8 | void save_dword(uint32_t data)
9 | {
10 | //
11 | fmc_unlock();
12 | fmc_word_program(FMC_WRITE_START_ADDR, data);
13 | //lock the main FMC after the program operation */
14 | fmc_lock();
15 | }
16 |
17 | uint32_t load_dword()
18 | {
19 | //
20 | uint32_t *ptr = (uint32_t *)FMC_WRITE_START_ADDR;
21 | return ptr[0];
22 | }
23 |
24 |
25 | /*
26 |
27 | static CONFIG_PARAMS g_config_params = {0};
28 |
29 |
30 |
31 |
32 | static void fmc_erase_pages(void)
33 | {
34 | //unlock the flash program/erase controller
35 | fmc_unlock();
36 | //clear all pending flags
37 | fmc_flag_clear(FMC_FLAG_END | FMC_FLAG_WPERR | FMC_FLAG_PGERR);
38 | //erase the flash pages
39 | fmc_page_erase(FMC_WRITE_START_ADDR);
40 | fmc_flag_clear(FMC_FLAG_END | FMC_FLAG_WPERR | FMC_FLAG_PGERR);
41 | //lock the main FMC after the erase operation
42 | fmc_lock();
43 | }
44 |
45 | static void fmc_program(uint32_t *data, int data_len)
46 | {
47 | //unlock the flash program/erase controller
48 | fmc_unlock();
49 |
50 | uint32_t address = FMC_WRITE_START_ADDR;
51 | //program flash
52 | while(address <= FMC_WRITE_END_ADDR) {
53 | if(data_len <= 0)
54 | break;
55 | fmc_word_program(address, *data);
56 | address += 4U;
57 | data++;
58 | fmc_flag_clear(FMC_FLAG_BANK0_END | FMC_FLAG_BANK0_WPERR | FMC_FLAG_BANK0_PGERR);
59 | data_len-=4;
60 | }
61 | //lock the main FMC after the program operation
62 | fmc_lock();
63 | }
64 |
65 | //参数是否有效
66 | int is_config_params_avaliable()
67 | {
68 | return (g_config_params.data_valid_flag == 0xF1)?1:0;
69 | }
70 |
71 | //加载配置参数
72 | int load_config_params()
73 | {
74 | CONFIG_PARAMS_UNION config_params_union;
75 | unsigned char *ptr = (unsigned char *)FMC_WRITE_START_ADDR; //将指针指向存储区首地址
76 | if(*ptr == 0xF1)
77 | {
78 | //从Flash中读取到有效的配置数据
79 | memcpy(&config_params_union, ptr, sizeof(CONFIG_PARAMS_UNION));
80 | memcpy(&g_config_params, &config_params_union.config_params, sizeof(CONFIG_PARAMS)); //拷贝数据
81 | return 0;
82 | }
83 | return -1;
84 | }
85 |
86 | //获取参数配置
87 | CONFIG_PARAMS *get_config_params()
88 | {
89 | return &g_config_params;
90 | }
91 |
92 |
93 | //保存配置参数
94 | int save_config_params(CONFIG_PARAMS *params)
95 | {
96 | if(params == NULL)
97 | return -1;
98 |
99 | CONFIG_PARAMS_UNION config_params_union;
100 | memset(&config_params_union, 0, sizeof(CONFIG_PARAMS_UNION)); //清空数据
101 | memcpy(&config_params_union.config_params, params, sizeof(CONFIG_PARAMS)); //拷贝数据
102 | //擦除FLASH
103 | fmc_erase_pages();
104 | //保存配置数据到Flash中
105 | fmc_program((uint32_t *)&config_params_union, sizeof(CONFIG_PARAMS_UNION));
106 |
107 | return 0;
108 | }
109 |
110 | */
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_dma.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_dma.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\gd32f10x_dma.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
35 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_fmc.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_fmc.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\gd32f10x_fmc.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
35 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_i2c.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_i2c.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\gd32f10x_i2c.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
35 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_rcu.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_rcu.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\gd32f10x_rcu.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
35 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_gpio.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_gpio.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\gd32f10x_gpio.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
35 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/system_gd32f10x.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/system_gd32f10x.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\system_gd32f10x.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
5 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
10 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
35 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/gd32f10x_sdio.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/gd32f10x_sdio.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Source\gd32f10x_sdio.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_sdio.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
35 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h
36 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/flashparam.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/flashparam.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\flashparam.c \
3 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdio.h \
4 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
5 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\string.h \
9 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
10 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
11 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
35 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
36 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h \
37 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\flashparam.h
38 |
--------------------------------------------------------------------------------
/CartReaderApp/Output/Debug/Obj/GDCartReader/sdcard.d:
--------------------------------------------------------------------------------
1 | Output/Debug/Obj/GDCartReader/sdcard.o: \
2 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\sdcard.c \
3 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\fatfs\sdcard.h \
4 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x.h \
5 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\core_cm3.h \
6 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stdint.h \
7 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL.h \
8 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_ConfDefaults.h \
9 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Conf.h \
10 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\__SEGGER_RTL_Arm_Conf.h \
11 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_version.h \
12 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_compiler.h \
13 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\CMSIS_5\CMSIS\Core\Include\cmsis_gcc.h \
14 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\system_gd32f10x.h \
15 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_libopt.h \
16 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\RTE_Components.h \
17 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_adc.h \
18 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_can.h \
19 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_crc.h \
20 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dac.h \
21 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dbg.h \
22 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_dma.h \
23 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_exti.h \
24 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fmc.h \
25 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_fwdgt.h \
26 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_gpio.h \
27 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_i2c.h \
28 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_misc.h \
29 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_pmu.h \
30 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rcu.h \
31 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_rtc.h \
32 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_spi.h \
33 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_timer.h \
34 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_usart.h \
35 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_wwdgt.h \
36 | I:\GZCSir\gbx_cart\cartflasher\CartReaderApp\GD32F10x\Device\Include\gd32f10x_sdio.h \
37 | J:\SEGGER\SEGGER\ Embedded\ Studio\ for\ ARM\ 6.22a\include\stddef.h
38 |
--------------------------------------------------------------------------------
/CartReaderApp/Common.c:
--------------------------------------------------------------------------------
1 | #include "Common.h"
2 |
3 |
4 |
5 |
6 | //SD Card
7 | FIL myDir;
8 | FIL myFile;
9 | // Array that holds the data
10 | FATFS fs;
11 | byte sdBuffer[512];
12 |
13 |
14 | //remember folder number to create a new folder for every save
15 | int foldern;
16 | char folder[36];
17 |
18 | // File browser
19 | char fileName[FILENAME_LENGTH];
20 | char filePath[FILEPATH_LENGTH];
21 | byte currPage;
22 | byte lastPage;
23 | byte numPages;
24 | boolean root = 0;
25 |
26 |
27 | // Common
28 | char romName[64];
29 | unsigned long sramSize = 0;
30 | int romType = 0;
31 | byte saveType;
32 | word romSize = 0;
33 | word numBanks = 128;
34 | char checksumStr[5];
35 | bool errorLvl = 0;
36 | boolean ignoreError = 0;
37 | //
38 | //
39 | //String CRC1 = "";
40 | //String CRC2 = "";
41 | //
42 | char flashid[5];
43 | //char vendorID[5];
44 | //
45 | //unsigned long sramBase;
46 | //unsigned long flashBanks;
47 |
48 |
49 |
50 | // Variable to count errors
51 | unsigned long writeErrors;
52 |
53 | /*********************************************************************
54 | *
55 | System base parts
56 |
57 | */
58 |
59 | static volatile int ticks = 0;
60 |
61 | void SysClockInit()
62 | {
63 | // Enable SysTick timer interrupt
64 | SysTick->LOAD = (SystemCoreClock / 1000) - 1;
65 | SysTick->VAL = 0;
66 | SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_TICKINT_Msk | SysTick_CTRL_ENABLE_Msk;
67 | }
68 |
69 | void SysTick_Handler(void)
70 | {
71 | ticks++;
72 | }
73 |
74 | int getSystick()
75 | {
76 | return ticks;
77 | }
78 |
79 | void delay(int n) {
80 | unsigned endTicks = ticks + n;
81 | while (ticks < endTicks);
82 |
83 | }
84 |
85 | void ResetSystem()
86 | {
87 | //
88 | __set_FAULTMASK(1);//关闭总中断
89 | NVIC_SystemReset();//请求单片机重启
90 | }
91 |
92 | void SysClockFree()
93 | {
94 | // Disable SysTick interrupt
95 | SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
96 | }
97 |
98 |
99 | void delayMicroseconds(uint16_t us)
100 | {
101 | //
102 | for(int i = 0;i // Win32
7 | //#include // uC/OS-II
8 |
9 | #include "../ff.h"
10 |
11 | #if _FS_REENTRANT
12 |
13 | /*------------------------------------------------------------------------*/
14 | /* Create a Synchronization Object for a Volume
15 | /*------------------------------------------------------------------------*/
16 | /* This function is called in f_mount function to create a new
17 | / synchronization object, such as semaphore and mutex. When a FALSE is
18 | / returned, the f_mount function fails with FR_INT_ERR.
19 | */
20 |
21 | BOOL ff_cre_syncobj ( /* TRUE:Function succeeded, FALSE:Could not create due to any error */
22 | BYTE vol, /* Corresponding logical drive being processed */
23 | _SYNC_t *sobj /* Pointer to return the created sync object */
24 | )
25 | {
26 | BOOL ret;
27 |
28 | *sobj = CreateMutex(NULL, FALSE, NULL); // Win32
29 | ret = (*sobj != INVALID_HANDLE_VALUE) ? TRUE : FALSE; //
30 |
31 | // *sobj = VolumeSemId[vol]; // uITRON (give a static created sync object)
32 | // ret = TRUE; // The initial value of the semaphore must be 1.
33 |
34 | // *sobj = OSMutexCreate(0, &err); // uC/OS-II
35 | // ret = (err == OS_NO_ERR) ? TRUE : FALSE; //
36 |
37 | return ret;
38 | }
39 |
40 |
41 |
42 | /*------------------------------------------------------------------------*/
43 | /* Delete a Synchronization Object */
44 | /*------------------------------------------------------------------------*/
45 | /* This function is called in f_mount function to delete a synchronization
46 | / object that created with ff_cre_syncobj function. When a FALSE is
47 | / returned, the f_mount function fails with FR_INT_ERR.
48 | */
49 |
50 | BOOL ff_del_syncobj ( /* TRUE:Function succeeded, FALSE:Could not delete due to any error */
51 | _SYNC_t sobj /* Sync object tied to the logical drive to be deleted */
52 | )
53 | {
54 | BOOL ret;
55 |
56 | ret = CloseHandle(sobj); // Win32
57 |
58 | // ret = TRUE; // uITRON (nothing to do)
59 |
60 | // OSMutexDel(sobj, OS_DEL_ALWAYS, &err); // uC/OS-II
61 | // ret = (err == OS_NO_ERR) ? TRUE : FALSE; //
62 |
63 | return ret;
64 | }
65 |
66 |
67 |
68 | /*------------------------------------------------------------------------*/
69 | /* Request Grant to Access the Volume */
70 | /*------------------------------------------------------------------------*/
71 | /* This function is called on entering file functions to lock the volume.
72 | / When a FALSE is returned, the file function fails with FR_TIMEOUT.
73 | */
74 |
75 | BOOL ff_req_grant ( /* TRUE:Got a grant to access the volume, FALSE:Could not get a grant */
76 | _SYNC_t sobj /* Sync object to wait */
77 | )
78 | {
79 | BOOL ret;
80 |
81 | ret = (WaitForSingleObject(sobj, _FS_TIMEOUT) == WAIT_OBJECT_0) ? TRUE : FALSE; // Win32
82 |
83 | // ret = (wai_sem(sobj) == E_OK) ? TRUE : FALSE; // uITRON
84 |
85 | // OSMutexPend(sobj, _FS_TIMEOUT, &err)); // uC/OS-II
86 | // ret = (err == OS_NO_ERR) ? TRUE : FALSE; //
87 |
88 | return ret;
89 | }
90 |
91 |
92 |
93 | /*------------------------------------------------------------------------*/
94 | /* Release Grant to Access the Volume */
95 | /*------------------------------------------------------------------------*/
96 | /* This function is called on leaving file functions to unlock the volume.
97 | */
98 |
99 | void ff_rel_grant (
100 | _SYNC_t sobj /* Sync object to be signaled */
101 | )
102 | {
103 | ReleaseMutex(sobj); // Win32
104 |
105 | // sig_sem(sobj); // uITRON
106 |
107 | // OSMutexPost(sobj); // uC/OS-II
108 | }
109 |
110 |
111 | #else
112 |
113 | #error This file is not needed in this configuration.
114 |
115 | #endif
116 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Source/gd32f10x_crc.c:
--------------------------------------------------------------------------------
1 | /*!
2 | \file gd32f10x_crc.c
3 | \brief CRC driver
4 |
5 | \version 2014-12-26, V1.0.0, firmware for GD32F10x
6 | \version 2017-06-20, V2.0.0, firmware for GD32F10x
7 | \version 2018-07-31, V2.1.0, firmware for GD32F10x
8 | \version 2020-09-30, V2.2.0, firmware for GD32F10x
9 | */
10 |
11 | /*
12 | Copyright (c) 2020, GigaDevice Semiconductor Inc.
13 |
14 | Redistribution and use in source and binary forms, with or without modification,
15 | are permitted provided that the following conditions are met:
16 |
17 | 1. Redistributions of source code must retain the above copyright notice, this
18 | list of conditions and the following disclaimer.
19 | 2. Redistributions in binary form must reproduce the above copyright notice,
20 | this list of conditions and the following disclaimer in the documentation
21 | and/or other materials provided with the distribution.
22 | 3. Neither the name of the copyright holder nor the names of its contributors
23 | may be used to endorse or promote products derived from this software without
24 | specific prior written permission.
25 |
26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
35 | OF SUCH DAMAGE.
36 | */
37 |
38 | #include "gd32f10x_crc.h"
39 |
40 | #define CRC_DATA_RESET_VALUE ((uint32_t)0xFFFFFFFFU)
41 | #define CRC_FDATA_RESET_VALUE ((uint32_t)0x00000000U)
42 |
43 | /*!
44 | \brief deinit CRC calculation unit
45 | \param[in] none
46 | \param[out] none
47 | \retval none
48 | */
49 | void crc_deinit(void)
50 | {
51 | CRC_DATA = CRC_DATA_RESET_VALUE;
52 | CRC_FDATA = CRC_FDATA_RESET_VALUE;
53 | CRC_CTL = (uint32_t)CRC_CTL_RST;
54 | }
55 |
56 | /*!
57 | \brief reset data register to the value of initializaiton data register
58 | \param[in] none
59 | \param[out] none
60 | \retval none
61 | */
62 | void crc_data_register_reset(void)
63 | {
64 | CRC_CTL |= (uint32_t)CRC_CTL_RST;
65 | }
66 |
67 | /*!
68 | \brief read the value of the data register
69 | \param[in] none
70 | \param[out] none
71 | \retval 32-bit value of the data register
72 | */
73 | uint32_t crc_data_register_read(void)
74 | {
75 | uint32_t data;
76 | data = CRC_DATA;
77 | return (data);
78 | }
79 |
80 | /*!
81 | \brief read the value of the free data register
82 | \param[in] none
83 | \param[out] none
84 | \retval 8-bit value of the free data register
85 | */
86 | uint8_t crc_free_data_register_read(void)
87 | {
88 | uint8_t fdata;
89 | fdata = (uint8_t)CRC_FDATA;
90 | return (fdata);
91 | }
92 |
93 | /*!
94 | \brief write data to the free data register
95 | \param[in] free_data: specify 8-bit data
96 | \param[out] none
97 | \retval none
98 | */
99 | void crc_free_data_register_write(uint8_t free_data)
100 | {
101 | CRC_FDATA = (uint32_t)free_data;
102 | }
103 |
104 | /*!
105 | \brief calculate the CRC value of a 32-bit data
106 | \param[in] sdata: specified 32-bit data
107 | \param[out] none
108 | \retval 32-bit value calculated by CRC
109 | */
110 | uint32_t crc_single_data_calculate(uint32_t sdata)
111 | {
112 | CRC_DATA = sdata;
113 | return (CRC_DATA);
114 | }
115 |
116 | /*!
117 | \brief calculate the CRC value of an array of 32-bit values
118 | \param[in] array: pointer to an array of 32-bit values
119 | \param[in] size: size of the array
120 | \param[out] none
121 | \retval 32-bit value calculated by CRC
122 | */
123 | uint32_t crc_block_data_calculate(uint32_t array[], uint32_t size)
124 | {
125 | uint32_t index;
126 | for(index = 0U; index < size; index++){
127 | CRC_DATA = array[index];
128 | }
129 | return (CRC_DATA);
130 | }
131 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Include/gd32f10x_wwdgt.h:
--------------------------------------------------------------------------------
1 | /*!
2 | \file gd32f10x_wwdgt.h
3 | \brief definitions for the WWDGT
4 |
5 | \version 2014-12-26, V1.0.0, firmware for GD32F10x
6 | \version 2017-06-20, V2.0.0, firmware for GD32F10x
7 | \version 2018-07-31, V2.1.0, firmware for GD32F10x
8 | */
9 |
10 | /*
11 | Copyright (c) 2018, GigaDevice Semiconductor Inc.
12 |
13 | All rights reserved.
14 |
15 | Redistribution and use in source and binary forms, with or without modification,
16 | are permitted provided that the following conditions are met:
17 |
18 | 1. Redistributions of source code must retain the above copyright notice, this
19 | list of conditions and the following disclaimer.
20 | 2. Redistributions in binary form must reproduce the above copyright notice,
21 | this list of conditions and the following disclaimer in the documentation
22 | and/or other materials provided with the distribution.
23 | 3. Neither the name of the copyright holder nor the names of its contributors
24 | may be used to endorse or promote products derived from this software without
25 | specific prior written permission.
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
31 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
36 | OF SUCH DAMAGE.
37 | */
38 |
39 | #ifndef GD32F10X_WWDGT_H
40 | #define GD32F10X_WWDGT_H
41 |
42 | #include "gd32f10x.h"
43 |
44 | /* WWDGT definitions */
45 | #define WWDGT WWDGT_BASE /*!< WWDGT base address */
46 |
47 | /* registers definitions */
48 | #define WWDGT_CTL REG32((WWDGT) + 0x00U) /*!< WWDGT control register */
49 | #define WWDGT_CFG REG32((WWDGT) + 0x04U) /*!< WWDGT configuration register */
50 | #define WWDGT_STAT REG32((WWDGT) + 0x08U) /*!< WWDGT status register */
51 |
52 | /* bits definitions */
53 | /* WWDGT_CTL */
54 | #define WWDGT_CTL_CNT BITS(0,6) /*!< WWDGT counter value */
55 | #define WWDGT_CTL_WDGTEN BIT(7) /*!< WWDGT counter enable */
56 |
57 | /* WWDGT_CFG */
58 | #define WWDGT_CFG_WIN BITS(0,6) /*!< WWDGT counter window value */
59 | #define WWDGT_CFG_PSC BITS(7,8) /*!< WWDGT prescaler divider value */
60 | #define WWDGT_CFG_EWIE BIT(9) /*!< early wakeup interrupt enable */
61 |
62 | /* WWDGT_STAT */
63 | #define WWDGT_STAT_EWIF BIT(0) /*!< early wakeup interrupt flag */
64 |
65 | /* constants definitions */
66 | #define CFG_PSC(regval) (BITS(7,8) & ((uint32_t)(regval) << 7)) /*!< write value to WWDGT_CFG_PSC bit field */
67 | #define WWDGT_CFG_PSC_DIV1 CFG_PSC(0) /*!< the time base of WWDGT = (PCLK1/4096)/1 */
68 | #define WWDGT_CFG_PSC_DIV2 CFG_PSC(1) /*!< the time base of WWDGT = (PCLK1/4096)/2 */
69 | #define WWDGT_CFG_PSC_DIV4 CFG_PSC(2) /*!< the time base of WWDGT = (PCLK1/4096)/4 */
70 | #define WWDGT_CFG_PSC_DIV8 CFG_PSC(3) /*!< the time base of WWDGT = (PCLK1/4096)/8 */
71 |
72 | /* function declarations */
73 | /* reset the window watchdog timer configuration */
74 | void wwdgt_deinit(void);
75 | /* start the window watchdog timer counter */
76 | void wwdgt_enable(void);
77 |
78 | /* configure the window watchdog timer counter value */
79 | void wwdgt_counter_update(uint16_t counter_value);
80 | /* configure counter value, window value, and prescaler divider value */
81 | void wwdgt_config(uint16_t counter, uint16_t window, uint32_t prescaler);
82 |
83 | /* enable early wakeup interrupt of WWDGT */
84 | void wwdgt_interrupt_enable(void);
85 | /* check early wakeup interrupt state of WWDGT */
86 | FlagStatus wwdgt_flag_get(void);
87 | /* clear early wakeup interrupt state of WWDGT */
88 | void wwdgt_flag_clear(void);
89 |
90 | #endif /* GD32F10X_WWDGT_H */
91 |
--------------------------------------------------------------------------------
/CartReaderApp/fat_fs/src/diskio.c:
--------------------------------------------------------------------------------
1 | /*-----------------------------------------------------------------------*/
2 | /* Low level disk I/O module skeleton for FatFs (C)ChaN, 2007 */
3 | /*-----------------------------------------------------------------------*/
4 | /* This is a stub disk I/O module that acts as front end of the existing */
5 | /* disk I/O modules and attach it to FatFs module with common interface. */
6 | /*-----------------------------------------------------------------------*/
7 |
8 | #include "diskio.h"
9 |
10 | /*-----------------------------------------------------------------------*/
11 | /* Correspondence between physical drive number and physical drive. */
12 |
13 | #define ATA 0
14 | #define MMC 1
15 | #define USB 2
16 |
17 |
18 |
19 | /*-----------------------------------------------------------------------*/
20 | /* Inicializes a Drive */
21 |
22 | DSTATUS disk_initialize (BYTE drv) /* Physical drive nmuber (0..) */
23 | {
24 | DSTATUS stat = STA_NOINIT;
25 |
26 | if(HCD_IsDeviceConnected(&USB_OTG_Core_dev))
27 | {
28 | stat &= ~STA_NOINIT;
29 | }
30 |
31 | return stat;
32 |
33 | }
34 |
35 |
36 |
37 | /*-----------------------------------------------------------------------*/
38 | /* Return Disk Status */
39 |
40 | DSTATUS disk_status (
41 | BYTE drv /* Physical drive nmuber (0..) */
42 | )
43 | {
44 | DSTATUS stat;
45 | int result;
46 |
47 | switch (drv) {
48 | case ATA :
49 | result = ATA_disk_status();
50 | // translate the reslut code here
51 |
52 | return stat;
53 |
54 | case MMC :
55 | result = MMC_disk_status();
56 | // translate the reslut code here
57 |
58 | return stat;
59 |
60 | case USB :
61 | result = USB_disk_status();
62 | // translate the reslut code here
63 |
64 | return stat;
65 | }
66 | return STA_NOINIT;
67 | }
68 |
69 |
70 |
71 | /*-----------------------------------------------------------------------*/
72 | /* Read Sector(s) */
73 |
74 | DRESULT disk_read (
75 | BYTE drv, /* Physical drive nmuber (0..) */
76 | BYTE *buff, /* Data buffer to store read data */
77 | DWORD sector, /* Sector address (LBA) */
78 | BYTE count /* Number of sectors to read (1..255) */
79 | )
80 | {
81 | DRESULT res;
82 | int result;
83 |
84 | switch (drv) {
85 | case ATA :
86 | result = ATA_disk_read(buff, sector, count);
87 | // translate the reslut code here
88 |
89 | return res;
90 |
91 | case MMC :
92 | result = MMC_disk_read(buff, sector, count);
93 | // translate the reslut code here
94 |
95 | return res;
96 |
97 | case USB :
98 | result = USB_disk_read(buff, sector, count);
99 | // translate the reslut code here
100 |
101 | return res;
102 | }
103 | return RES_PARERR;
104 | }
105 |
106 |
107 |
108 | /*-----------------------------------------------------------------------*/
109 | /* Write Sector(s) */
110 |
111 | #if _READONLY == 0
112 | DRESULT disk_write (
113 | BYTE drv, /* Physical drive nmuber (0..) */
114 | const BYTE *buff, /* Data to be written */
115 | DWORD sector, /* Sector address (LBA) */
116 | BYTE count /* Number of sectors to write (1..255) */
117 | )
118 | {
119 | DRESULT res;
120 | int result;
121 |
122 | switch (drv) {
123 | case ATA :
124 | result = ATA_disk_write(buff, sector, count);
125 | // translate the reslut code here
126 |
127 | return res;
128 |
129 | case MMC :
130 | result = MMC_disk_write(buff, sector, count);
131 | // translate the reslut code here
132 |
133 | return res;
134 |
135 | case USB :
136 | result = USB_disk_write(buff, sector, count);
137 | // translate the reslut code here
138 |
139 | return res;
140 | }
141 | return RES_PARERR;
142 | }
143 | #endif /* _READONLY */
144 |
145 |
146 |
147 | /*-----------------------------------------------------------------------*/
148 | /* Miscellaneous Functions */
149 |
150 | DRESULT disk_ioctl (
151 | BYTE drv, /* Physical drive nmuber (0..) */
152 | BYTE ctrl, /* Control code */
153 | void *buff /* Buffer to send/receive control data */
154 | )
155 | {
156 | DRESULT res;
157 | int result;
158 |
159 | switch (drv) {
160 | case ATA :
161 | // pre-process here
162 |
163 | result = ATA_disk_ioctl(ctrl, buff);
164 | // post-process here
165 |
166 | return res;
167 |
168 | case MMC :
169 | // pre-process here
170 |
171 | result = MMC_disk_ioctl(ctrl, buff);
172 | // post-process here
173 |
174 | return res;
175 |
176 | case USB :
177 | // pre-process here
178 |
179 | result = USB_disk_ioctl(ctrl, buff);
180 | // post-process here
181 |
182 | return res;
183 | }
184 | return RES_PARERR;
185 | }
186 |
187 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Include/gd32f10x_misc.h:
--------------------------------------------------------------------------------
1 | /*!
2 | \file gd32f10x_misc.h
3 | \brief definitions for the MISC
4 |
5 | \version 2014-12-26, V1.0.0, firmware for GD32F10x
6 | \version 2017-06-20, V2.0.0, firmware for GD32F10x
7 | \version 2018-07-31, V2.1.0, firmware for GD32F10x
8 | */
9 |
10 | /*
11 | Copyright (c) 2018, GigaDevice Semiconductor Inc.
12 |
13 | All rights reserved.
14 |
15 | Redistribution and use in source and binary forms, with or without modification,
16 | are permitted provided that the following conditions are met:
17 |
18 | 1. Redistributions of source code must retain the above copyright notice, this
19 | list of conditions and the following disclaimer.
20 | 2. Redistributions in binary form must reproduce the above copyright notice,
21 | this list of conditions and the following disclaimer in the documentation
22 | and/or other materials provided with the distribution.
23 | 3. Neither the name of the copyright holder nor the names of its contributors
24 | may be used to endorse or promote products derived from this software without
25 | specific prior written permission.
26 |
27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
31 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
36 | OF SUCH DAMAGE.
37 | */
38 |
39 | #ifndef GD32F10X_MISC_H
40 | #define GD32F10X_MISC_H
41 |
42 | #include "gd32f10x.h"
43 |
44 | /* constants definitions */
45 | /* set the RAM and FLASH base address */
46 | #define NVIC_VECTTAB_RAM ((uint32_t)0x20000000) /*!< RAM base address */
47 | #define NVIC_VECTTAB_FLASH ((uint32_t)0x08000000) /*!< Flash base address */
48 |
49 | /* set the NVIC vector table offset mask */
50 | #define NVIC_VECTTAB_OFFSET_MASK ((uint32_t)0x1FFFFF80)
51 |
52 | /* the register key mask, if you want to do the write operation, you should write 0x5FA to VECTKEY bits */
53 | #define NVIC_AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000)
54 |
55 | /* priority group - define the pre-emption priority and the subpriority */
56 | #define NVIC_PRIGROUP_PRE0_SUB4 ((uint32_t)0x700) /*!< 0 bits for pre-emption priority 4 bits for subpriority */
57 | #define NVIC_PRIGROUP_PRE1_SUB3 ((uint32_t)0x600) /*!< 1 bits for pre-emption priority 3 bits for subpriority */
58 | #define NVIC_PRIGROUP_PRE2_SUB2 ((uint32_t)0x500) /*!< 2 bits for pre-emption priority 2 bits for subpriority */
59 | #define NVIC_PRIGROUP_PRE3_SUB1 ((uint32_t)0x400) /*!< 3 bits for pre-emption priority 1 bits for subpriority */
60 | #define NVIC_PRIGROUP_PRE4_SUB0 ((uint32_t)0x300) /*!< 4 bits for pre-emption priority 0 bits for subpriority */
61 |
62 | /* choose the method to enter or exit the lowpower mode */
63 | #define SCB_SCR_SLEEPONEXIT ((uint8_t)0x02) /*!< choose the the system whether enter low power mode by exiting from ISR */
64 | #define SCB_SCR_SLEEPDEEP ((uint8_t)0x04) /*!< choose the the system enter the DEEPSLEEP mode or SLEEP mode */
65 | #define SCB_SCR_SEVONPEND ((uint8_t)0x10) /*!< choose the interrupt source that can wake up the lowpower mode */
66 |
67 | #define SCB_LPM_SLEEP_EXIT_ISR SCB_SCR_SLEEPONEXIT
68 | #define SCB_LPM_DEEPSLEEP SCB_SCR_SLEEPDEEP
69 | #define SCB_LPM_WAKE_BY_ALL_INT SCB_SCR_SEVONPEND
70 |
71 | /* choose the systick clock source */
72 | #define SYSTICK_CLKSOURCE_HCLK_DIV8 ((uint32_t)0xFFFFFFFBU) /*!< systick clock source is from HCLK/8 */
73 | #define SYSTICK_CLKSOURCE_HCLK ((uint32_t)0x00000004U) /*!< systick clock source is from HCLK */
74 |
75 | /* function declarations */
76 | /* set the priority group */
77 | void nvic_priority_group_set(uint32_t nvic_prigroup);
78 |
79 | /* enable NVIC request */
80 | void nvic_irq_enable(uint8_t nvic_irq, uint8_t nvic_irq_pre_priority, uint8_t nvic_irq_sub_priority);
81 | /* disable NVIC request */
82 | void nvic_irq_disable(uint8_t nvic_irq);
83 |
84 | /* set the NVIC vector table base address */
85 | void nvic_vector_table_set(uint32_t nvic_vict_tab, uint32_t offset);
86 |
87 | /* set the state of the low power mode */
88 | void system_lowpower_set(uint8_t lowpower_mode);
89 | /* reset the state of the low power mode */
90 | void system_lowpower_reset(uint8_t lowpower_mode);
91 |
92 | /* set the systick clock source */
93 | void systick_clksource_set(uint32_t systick_clksource);
94 |
95 | #endif /* GD32F10X_MISC_H */
96 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Source/gd32f10x_wwdgt.c:
--------------------------------------------------------------------------------
1 | /*!
2 | \file gd32f10x_wwdgt.c
3 | \brief WWDGT driver
4 |
5 | \version 2014-12-26, V1.0.0, firmware for GD32F10x
6 | \version 2017-06-20, V2.0.0, firmware for GD32F10x
7 | \version 2018-07-31, V2.1.0, firmware for GD32F10x
8 | \version 2020-09-30, V2.2.0, firmware for GD32F10x
9 | */
10 |
11 | /*
12 | Copyright (c) 2020, GigaDevice Semiconductor Inc.
13 |
14 | Redistribution and use in source and binary forms, with or without modification,
15 | are permitted provided that the following conditions are met:
16 |
17 | 1. Redistributions of source code must retain the above copyright notice, this
18 | list of conditions and the following disclaimer.
19 | 2. Redistributions in binary form must reproduce the above copyright notice,
20 | this list of conditions and the following disclaimer in the documentation
21 | and/or other materials provided with the distribution.
22 | 3. Neither the name of the copyright holder nor the names of its contributors
23 | may be used to endorse or promote products derived from this software without
24 | specific prior written permission.
25 |
26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
35 | OF SUCH DAMAGE.
36 | */
37 |
38 | #include "gd32f10x_wwdgt.h"
39 |
40 | /* write value to WWDGT_CTL_CNT bit field */
41 | #define CTL_CNT(regval) (BITS(0,6) & ((uint32_t)(regval) << 0))
42 | /* write value to WWDGT_CFG_WIN bit field */
43 | #define CFG_WIN(regval) (BITS(0,6) & ((uint32_t)(regval) << 0))
44 |
45 | /*!
46 | \brief reset the window watchdog timer configuration
47 | \param[in] none
48 | \param[out] none
49 | \retval none
50 | */
51 | void wwdgt_deinit(void)
52 | {
53 | rcu_periph_reset_enable(RCU_WWDGTRST);
54 | rcu_periph_reset_disable(RCU_WWDGTRST);
55 | }
56 |
57 | /*!
58 | \brief start the window watchdog timer counter
59 | \param[in] none
60 | \param[out] none
61 | \retval none
62 | */
63 | void wwdgt_enable(void)
64 | {
65 | WWDGT_CTL |= WWDGT_CTL_WDGTEN;
66 | }
67 |
68 | /*!
69 | \brief configure the window watchdog timer counter value
70 | \param[in] counter_value: 0x00 - 0x7F
71 | \param[out] none
72 | \retval none
73 | */
74 | void wwdgt_counter_update(uint16_t counter_value)
75 | {
76 | WWDGT_CTL = (uint32_t)(CTL_CNT(counter_value));
77 | }
78 |
79 | /*!
80 | \brief configure counter value, window value, and prescaler divider value
81 | \param[in] counter: 0x00 - 0x7F
82 | \param[in] window: 0x00 - 0x7F
83 | \param[in] prescaler: wwdgt prescaler value
84 | only one parameter can be selected which is shown as below:
85 | \arg WWDGT_CFG_PSC_DIV1: the time base of window watchdog counter = (PCLK1/4096)/1
86 | \arg WWDGT_CFG_PSC_DIV2: the time base of window watchdog counter = (PCLK1/4096)/2
87 | \arg WWDGT_CFG_PSC_DIV4: the time base of window watchdog counter = (PCLK1/4096)/4
88 | \arg WWDGT_CFG_PSC_DIV8: the time base of window watchdog counter = (PCLK1/4096)/8
89 | \param[out] none
90 | \retval none
91 | */
92 | void wwdgt_config(uint16_t counter, uint16_t window, uint32_t prescaler)
93 | {
94 | WWDGT_CTL = (uint32_t)(CTL_CNT(counter));
95 | WWDGT_CFG = (uint32_t)(CFG_WIN(window) | prescaler);
96 | }
97 |
98 | /*!
99 | \brief enable early wakeup interrupt of WWDGT
100 | \param[in] none
101 | \param[out] none
102 | \retval none
103 | */
104 | void wwdgt_interrupt_enable(void)
105 | {
106 | WWDGT_CFG |= WWDGT_CFG_EWIE;
107 | }
108 |
109 | /*!
110 | \brief check early wakeup interrupt state of WWDGT
111 | \param[in] none
112 | \param[out] none
113 | \retval FlagStatus: SET or RESET
114 | */
115 | FlagStatus wwdgt_flag_get(void)
116 | {
117 | if(WWDGT_STAT & WWDGT_STAT_EWIF){
118 | return SET;
119 | }
120 |
121 | return RESET;
122 | }
123 |
124 | /*!
125 | \brief clear early wakeup interrupt state of WWDGT
126 | \param[in] none
127 | \param[out] none
128 | \retval none
129 | */
130 | void wwdgt_flag_clear(void)
131 | {
132 | WWDGT_STAT = (uint32_t)(RESET);
133 | }
134 |
--------------------------------------------------------------------------------
/CartReaderApp/GDCartReader.emProject:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
38 |
39 |
40 |
41 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
99 |
100 |
106 |
112 |
113 |
--------------------------------------------------------------------------------
/CartReaderApp/fat_fs/readme.txt:
--------------------------------------------------------------------------------
1 | FatFs Module Source Files R0.07e (C)ChaN, 2009
2 |
3 |
4 | FILES
5 |
6 | ffconf.h Configuration file for FatFs module.
7 | ff.h Common include file for FatFs and application module.
8 | ff.c FatFs module.
9 | diskio.h Common include file for FatFs and disk I/O module.
10 | diskio.c Skeleton of low level disk I/O module.
11 | integer.h Alternative type definitions for integer variables.
12 | option Optional external functions.
13 |
14 | Low level disk I/O module is not included in this archive because the FatFs
15 | module is only a generic file system layer and not depend on any specific
16 | storage device. You have to provide a low level disk I/O module that written
17 | to control your storage device.
18 |
19 |
20 |
21 | AGREEMENTS
22 |
23 | FatFs module is an open source software to implement FAT file system to
24 | small embedded systems. This is a free software and is opened for education,
25 | research and commercial developments under license policy of following trems.
26 |
27 | Copyright (C) 2009, ChaN, all right reserved.
28 |
29 | * The FatFs module is a free software and there is NO WARRANTY.
30 | * No restriction on use. You can use, modify and redistribute it for
31 | personal, non-profit or commercial product UNDER YOUR RESPONSIBILITY.
32 | * Redistributions of source code must retain the above copyright notice.
33 |
34 |
35 |
36 | REVISION HISTORY
37 |
38 | Feb 26, 2006 R0.00 Prototype
39 |
40 | Apr 29, 2006 R0.01 First release.
41 |
42 | Jun 01, 2006 R0.02 Added FAT12.
43 | Removed unbuffered mode.
44 | Fixed a problem on small (<32M) patition.
45 |
46 | Jun 10, 2006 R0.02a Added a configuration option _FS_MINIMUM.
47 |
48 | Sep 22, 2006 R0.03 Added f_rename.
49 | Changed option _FS_MINIMUM to _FS_MINIMIZE.
50 |
51 | Dec 11, 2006 R0.03a Improved cluster scan algolithm to write files fast.
52 | Fixed f_mkdir creates incorrect directory on FAT32.
53 |
54 | Feb 04, 2007 R0.04 Supported multiple drive system. (FatFs)
55 | Changed some APIs for multiple drive system.
56 | Added f_mkfs. (FatFs)
57 | Added _USE_FAT32 option. (Tiny-FatFs)
58 |
59 | Apr 01, 2007 R0.04a Supported multiple partitions on a plysical drive. (FatFs)
60 | Fixed an endian sensitive code in f_mkfs. (FatFs)
61 | Added a capability of extending the file size to f_lseek.
62 | Added minimization level 3.
63 | Fixed a problem that can collapse a sector when recreate an
64 | existing file in any sub-directory at non FAT32 cfg. (Tiny-FatFs)
65 |
66 | May 05, 2007 R0.04b Added _USE_NTFLAG option.
67 | Added FSInfo support.
68 | Fixed some problems corresponds to FAT32. (Tiny-FatFs)
69 | Fixed DBCS name can result FR_INVALID_NAME.
70 | Fixed short seek (0 < ofs <= csize) collapses the file object.
71 |
72 | Aug 25, 2007 R0.05 Changed arguments of f_read, f_write.
73 | Changed arguments of f_mkfs. (FatFs)
74 | Fixed f_mkfs on FAT32 creates incorrect FSInfo. (FatFs)
75 | Fixed f_mkdir on FAT32 creates incorrect directory. (FatFs)
76 |
77 | Feb 03, 2008 R0.05a Added f_truncate().
78 | Added f_utime().
79 | Fixed off by one error at FAT sub-type determination.
80 | Fixed btr in f_read() can be mistruncated.
81 | Fixed cached sector is not flushed when create and close without write.
82 |
83 | Apr 01, 2008 R0.06 Added f_forward(). (Tiny-FatFs)
84 | Added string functions: fputc(), fputs(), fprintf() and fgets().
85 | Improved performance of f_lseek() on move to the same or following cluster.
86 |
87 | Apr 01, 2009, R0.07 Merged Tiny-FatFs as a buffer configuration option.
88 | Added long file name support.
89 | Added multiple code page support.
90 | Added re-entrancy for multitask operation.
91 | Added auto cluster size selection to f_mkfs().
92 | Added rewind option to f_readdir().
93 | Changed result code of critical errors.
94 | Renamed string functions to avoid name collision.
95 |
96 | Apr 14, 2009, R0.07a Separated out OS dependent code on reentrant cfg.
97 | Added multiple sector size support.
98 |
99 | Jun 21, 2009, R0.07c Fixed f_unlink() may return FR_OK on error.
100 | Fixed wrong cache control in f_lseek().
101 | Added relative path feature.
102 | Added f_chdir().
103 | Added f_chdrive().
104 | Added proper case conversion for extended characters.
105 |
106 | Nov 03,'2009 R0.07e Separated out configuration options from ff.h to ffconf.h.
107 | Added a configuration option, _LFN_UNICODE.
108 | Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.
109 | Fixed name matching error on the 13 char boundary.
110 | Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
111 |
--------------------------------------------------------------------------------
/CartReaderApp/fatfs/ffsystem.c:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------*/
2 | /* Sample Code of OS Dependent Functions for FatFs */
3 | /* (C)ChaN, 2018 */
4 | /*------------------------------------------------------------------------*/
5 |
6 |
7 | #include "ff.h"
8 |
9 |
10 | #if FF_USE_LFN == 3 /* Dynamic memory allocation */
11 |
12 | /*------------------------------------------------------------------------*/
13 | /* Allocate a memory block */
14 | /*------------------------------------------------------------------------*/
15 |
16 | void* ff_memalloc ( /* Returns pointer to the allocated memory block (null if not enough core) */
17 | UINT msize /* Number of bytes to allocate */
18 | )
19 | {
20 | return malloc(msize); /* Allocate a new memory block with POSIX API */
21 | }
22 |
23 |
24 | /*------------------------------------------------------------------------*/
25 | /* Free a memory block */
26 | /*------------------------------------------------------------------------*/
27 |
28 | void ff_memfree (
29 | void* mblock /* Pointer to the memory block to free (nothing to do if null) */
30 | )
31 | {
32 | free(mblock); /* Free the memory block with POSIX API */
33 | }
34 |
35 | #endif
36 |
37 |
38 |
39 | #if FF_FS_REENTRANT /* Mutal exclusion */
40 |
41 | /*------------------------------------------------------------------------*/
42 | /* Create a Synchronization Object */
43 | /*------------------------------------------------------------------------*/
44 | /* This function is called in f_mount() function to create a new
45 | / synchronization object for the volume, such as semaphore and mutex.
46 | / When a 0 is returned, the f_mount() function fails with FR_INT_ERR.
47 | */
48 |
49 | //const osMutexDef_t Mutex[FF_VOLUMES]; /* Table of CMSIS-RTOS mutex */
50 |
51 |
52 | int ff_cre_syncobj ( /* 1:Function succeeded, 0:Could not create the sync object */
53 | BYTE vol, /* Corresponding volume (logical drive number) */
54 | FF_SYNC_t* sobj /* Pointer to return the created sync object */
55 | )
56 | {
57 | /* Win32 */
58 | *sobj = CreateMutex(NULL, FALSE, NULL);
59 | return (int)(*sobj != INVALID_HANDLE_VALUE);
60 |
61 | /* uITRON */
62 | // T_CSEM csem = {TA_TPRI,1,1};
63 | // *sobj = acre_sem(&csem);
64 | // return (int)(*sobj > 0);
65 |
66 | /* uC/OS-II */
67 | // OS_ERR err;
68 | // *sobj = OSMutexCreate(0, &err);
69 | // return (int)(err == OS_NO_ERR);
70 |
71 | /* FreeRTOS */
72 | // *sobj = xSemaphoreCreateMutex();
73 | // return (int)(*sobj != NULL);
74 |
75 | /* CMSIS-RTOS */
76 | // *sobj = osMutexCreate(&Mutex[vol]);
77 | // return (int)(*sobj != NULL);
78 | }
79 |
80 |
81 | /*------------------------------------------------------------------------*/
82 | /* Delete a Synchronization Object */
83 | /*------------------------------------------------------------------------*/
84 | /* This function is called in f_mount() function to delete a synchronization
85 | / object that created with ff_cre_syncobj() function. When a 0 is returned,
86 | / the f_mount() function fails with FR_INT_ERR.
87 | */
88 |
89 | int ff_del_syncobj ( /* 1:Function succeeded, 0:Could not delete due to an error */
90 | FF_SYNC_t sobj /* Sync object tied to the logical drive to be deleted */
91 | )
92 | {
93 | /* Win32 */
94 | return (int)CloseHandle(sobj);
95 |
96 | /* uITRON */
97 | // return (int)(del_sem(sobj) == E_OK);
98 |
99 | /* uC/OS-II */
100 | // OS_ERR err;
101 | // OSMutexDel(sobj, OS_DEL_ALWAYS, &err);
102 | // return (int)(err == OS_NO_ERR);
103 |
104 | /* FreeRTOS */
105 | // vSemaphoreDelete(sobj);
106 | // return 1;
107 |
108 | /* CMSIS-RTOS */
109 | // return (int)(osMutexDelete(sobj) == osOK);
110 | }
111 |
112 |
113 | /*------------------------------------------------------------------------*/
114 | /* Request Grant to Access the Volume */
115 | /*------------------------------------------------------------------------*/
116 | /* This function is called on entering file functions to lock the volume.
117 | / When a 0 is returned, the file function fails with FR_TIMEOUT.
118 | */
119 |
120 | int ff_req_grant ( /* 1:Got a grant to access the volume, 0:Could not get a grant */
121 | FF_SYNC_t sobj /* Sync object to wait */
122 | )
123 | {
124 | /* Win32 */
125 | return (int)(WaitForSingleObject(sobj, FF_FS_TIMEOUT) == WAIT_OBJECT_0);
126 |
127 | /* uITRON */
128 | // return (int)(wai_sem(sobj) == E_OK);
129 |
130 | /* uC/OS-II */
131 | // OS_ERR err;
132 | // OSMutexPend(sobj, FF_FS_TIMEOUT, &err));
133 | // return (int)(err == OS_NO_ERR);
134 |
135 | /* FreeRTOS */
136 | // return (int)(xSemaphoreTake(sobj, FF_FS_TIMEOUT) == pdTRUE);
137 |
138 | /* CMSIS-RTOS */
139 | // return (int)(osMutexWait(sobj, FF_FS_TIMEOUT) == osOK);
140 | }
141 |
142 |
143 | /*------------------------------------------------------------------------*/
144 | /* Release Grant to Access the Volume */
145 | /*------------------------------------------------------------------------*/
146 | /* This function is called on leaving file functions to unlock the volume.
147 | */
148 |
149 | void ff_rel_grant (
150 | FF_SYNC_t sobj /* Sync object to be signaled */
151 | )
152 | {
153 | /* Win32 */
154 | ReleaseMutex(sobj);
155 |
156 | /* uITRON */
157 | // sig_sem(sobj);
158 |
159 | /* uC/OS-II */
160 | // OSMutexPost(sobj);
161 |
162 | /* FreeRTOS */
163 | // xSemaphoreGive(sobj);
164 |
165 | /* CMSIS-RTOS */
166 | // osMutexRelease(sobj);
167 | }
168 |
169 | #endif
170 |
171 |
--------------------------------------------------------------------------------
/CartReaderApp/GD32F10x/Device/Source/gd32f10x_fwdgt.c:
--------------------------------------------------------------------------------
1 | /*!
2 | \file gd32f10x_fwdgt.c
3 | \brief FWDGT driver
4 |
5 | \version 2014-12-26, V1.0.0, firmware for GD32F10x
6 | \version 2017-06-20, V2.0.0, firmware for GD32F10x
7 | \version 2018-07-31, V2.1.0, firmware for GD32F10x
8 | \version 2020-09-30, V2.2.0, firmware for GD32F10x
9 | */
10 |
11 | /*
12 | Copyright (c) 2020, GigaDevice Semiconductor Inc.
13 |
14 | Redistribution and use in source and binary forms, with or without modification,
15 | are permitted provided that the following conditions are met:
16 |
17 | 1. Redistributions of source code must retain the above copyright notice, this
18 | list of conditions and the following disclaimer.
19 | 2. Redistributions in binary form must reproduce the above copyright notice,
20 | this list of conditions and the following disclaimer in the documentation
21 | and/or other materials provided with the distribution.
22 | 3. Neither the name of the copyright holder nor the names of its contributors
23 | may be used to endorse or promote products derived from this software without
24 | specific prior written permission.
25 |
26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
30 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
35 | OF SUCH DAMAGE.
36 | */
37 |
38 | #include "gd32f10x_fwdgt.h"
39 |
40 | /* write value to FWDGT_CTL_CMD bit field */
41 | #define CTL_CMD(regval) (BITS(0,15) & ((uint32_t)(regval) << 0))
42 | /* write value to FWDGT_RLD_RLD bit field */
43 | #define RLD_RLD(regval) (BITS(0,11) & ((uint32_t)(regval) << 0))
44 |
45 | /*!
46 | \brief enable write access to FWDGT_PSC and FWDGT_RLD
47 | \param[in] none
48 | \param[out] none
49 | \retval none
50 | */
51 | void fwdgt_write_enable(void)
52 | {
53 | FWDGT_CTL = FWDGT_WRITEACCESS_ENABLE;
54 | }
55 |
56 | /*!
57 | \brief disable write access to FWDGT_PSC and FWDGT_RLD
58 | \param[in] none
59 | \param[out] none
60 | \retval none
61 | */
62 | void fwdgt_write_disable(void)
63 | {
64 | FWDGT_CTL = FWDGT_WRITEACCESS_DISABLE;
65 | }
66 |
67 | /*!
68 | \brief start the free watchdog timer counter
69 | \param[in] none
70 | \param[out] none
71 | \retval none
72 | */
73 | void fwdgt_enable(void)
74 | {
75 | FWDGT_CTL = FWDGT_KEY_ENABLE;
76 | }
77 |
78 | /*!
79 | \brief reload the counter of FWDGT
80 | \param[in] none
81 | \param[out] none
82 | \retval none
83 | */
84 | void fwdgt_counter_reload(void)
85 | {
86 | FWDGT_CTL = FWDGT_KEY_RELOAD;
87 | }
88 |
89 | /*!
90 | \brief configure counter reload value, and prescaler divider value
91 | \param[in] reload_value: specify reload value(0x0000 - 0x0FFF)
92 | \param[in] prescaler_div: FWDGT prescaler value
93 | only one parameter can be selected which is shown as below:
94 | \arg FWDGT_PSC_DIV4: FWDGT prescaler set to 4
95 | \arg FWDGT_PSC_DIV8: FWDGT prescaler set to 8
96 | \arg FWDGT_PSC_DIV16: FWDGT prescaler set to 16
97 | \arg FWDGT_PSC_DIV32: FWDGT prescaler set to 32
98 | \arg FWDGT_PSC_DIV64: FWDGT prescaler set to 64
99 | \arg FWDGT_PSC_DIV128: FWDGT prescaler set to 128
100 | \arg FWDGT_PSC_DIV256: FWDGT prescaler set to 256
101 | \param[out] none
102 | \retval ErrStatus: ERROR or SUCCESS
103 | */
104 | ErrStatus fwdgt_config(uint16_t reload_value, uint8_t prescaler_div)
105 | {
106 | uint32_t timeout = FWDGT_PSC_TIMEOUT;
107 | uint32_t flag_status = RESET;
108 |
109 | /* enable write access to FWDGT_PSC,and FWDGT_RLD */
110 | FWDGT_CTL = FWDGT_WRITEACCESS_ENABLE;
111 | /* wait until the PUD flag to be reset */
112 | do{
113 | flag_status = FWDGT_STAT & FWDGT_STAT_PUD;
114 | }while((--timeout > 0U) && ((uint32_t)RESET != flag_status));
115 |
116 | if((uint32_t)RESET != flag_status){
117 | return ERROR;
118 | }
119 | /* configure FWDGT */
120 | FWDGT_PSC = (uint32_t)prescaler_div;
121 |
122 | timeout = FWDGT_RLD_TIMEOUT;
123 | /* wait until the RUD flag to be reset */
124 | do{
125 | flag_status = FWDGT_STAT & FWDGT_STAT_RUD;
126 | }while((--timeout > 0U) && ((uint32_t)RESET != flag_status));
127 |
128 | if((uint32_t)RESET != flag_status){
129 | return ERROR;
130 | }
131 | FWDGT_RLD = RLD_RLD(reload_value);
132 | /* reload the counter */
133 | FWDGT_CTL = FWDGT_KEY_RELOAD;
134 |
135 | return SUCCESS;
136 | }
137 |
138 | /*!
139 | \brief get flag state of FWDGT
140 | \param[in] flag: flag to get
141 | only one parameter can be selected which is shown as below:
142 | \arg FWDGT_FLAG_PUD: a write operation to FWDGT_PSC register is on going
143 | \arg FWDGT_FLAG_RUD: a write operation to FWDGT_RLD register is on going
144 | \param[out] none
145 | \retval FlagStatus: SET or RESET
146 | */
147 | FlagStatus fwdgt_flag_get(uint16_t flag)
148 | {
149 | if(FWDGT_STAT & flag){
150 | return SET;
151 | }
152 |
153 | return RESET;
154 | }
155 |
--------------------------------------------------------------------------------