Skip to content

Commit

Permalink
Merge branch 'developing' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Sep 27, 2021
2 parents d3b9a9b + db6597f commit 81fb972
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 26 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pico_Template (v1.2.2)
# Pico_Template (v1.3.0)
An MDK template for Raspberry Pi Pico

- Compiler: Arm Compiler 6.15 and above (Using non-intrusive wrapper to support pico-sdk which is written in GCC)
Expand All @@ -7,12 +7,12 @@ An MDK template for Raspberry Pi Pico
- Verified with Arm Compiler 6.15 and above.
- Provide users an option to use the ***stdio*** solution from ***pico-sdk (by default)*** or retarget the ***stdin/stdout*** to a user specified location directly. (See note in ***env_wrapper.c***).
- Support Debug in MDK
- [Using J-Link](https://wiki.segger.com/Raspberry_Pi_Pico) (HW revision 11 and above)
- [Using CMSIS-DAP](https://github.com/majbthrd/pico-debug)
- [Using J-Link](https://wiki.segger.com/Raspberry_Pi_Pico) (Not Validated in MDK)
- [Using CMSIS-DAP](https://github.com/majbthrd/pico-debug) (Validated in MDK)
- Add dedicated project configurations for:
- [**AC6-flash**] Running code in Flash (XIP)
- [**AC6-RunInSRAM**] Running code in SRAM (code is still stored in FLASH)
- [**AC6-DebugInSRAM**] No Flash is used and only suitable for RAM based debug.
- [**AC6-DebugInSRAM**] "no_flash" mode in the original pico-sdk. It is suitable for MDK debug.



Expand Down Expand Up @@ -128,11 +128,13 @@ Pico-Template provides a dedicated project configuration for downloading and deb
4. Compile and Debug
5. Enjoy...

**NOTE: In this mode, the "RESET" doesn't really work as we expect. If you do want to RESET, please press the "Reset Pico " button shown below:**
**NOTE: **

![image-20210919180644156](documents/Pictures/Reset_Pico.png)
**1. In this mode, the "RESET" doesn't really work as we expect. If you do want to RESET, please press the "Reset Pico " button shown below:**

![image-20210919180644156](documents/Pictures/Reset_Pico.png)

**2. If you cannot find this Toolbox, please start your debug session and go to menu "View"->"Toolbox Window".**

#### 2.3.2 For Other configurations

Expand All @@ -152,7 +154,6 @@ Besides the project configuration aforementioned, i.e. **DebugInSRAM** , the res


# Known issue

- Not all peripheral modules are added to the compilation. But I guess it is just a piece of cake for you : P

- ***Please use the elf2uf2 tool in this template*** to convert the generated axf into uf2.
Expand Down
3 changes: 1 addition & 2 deletions project/mdk/debug_with_cmsis-dap_in_ram.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ FUNC void debug_from_ram(void)

DEFINE BUTTON "Reset Pico", "debug_from_ram()"

RESET
G, Reset_Handler
debug_from_ram();
15 changes: 0 additions & 15 deletions project/mdk/startup_RP2040.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,6 @@ __attribute__((aligned(256)))
/* Interrupts 10..31 are left out */
};

#if defined(PICO_NO_FLASH)


__attribute__((section (".ARM.__at_0x4005801C"), used))
const uint32_t c_wScratchMagicTable[] = {
0xb007c0d3, //!< scratch 4
0x6FF83F2C, //!< scratch 5
(uintptr_t)&__INITIAL_SP, //!< scratch 6
0x20000001, //!< scratch 7
};



#endif

#if defined ( __GNUC__ )
#pragma GCC diagnostic pop
#endif
Expand Down
2 changes: 1 addition & 1 deletion project/mdk/template.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@
<SetRegEntry>
<Number>0</Number>
<Key>CMSIS_AGDI</Key>
<Name>-X"Any" -UAny -O718 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(0BC12477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN0</Name>
<Name>-X"Any" -UAny -O206 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(0BC12477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC1000 -FN0</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
Expand Down
2 changes: 1 addition & 1 deletion project/mdk/template.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>.\axf2uf2.bat</UserProg1Name>
<UserProg2Name></UserProg2Name>
Expand Down

0 comments on commit 81fb972

Please sign in to comment.