Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mtb4fap #305

Merged
merged 7 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<TargetCommonOption>
<Device>STM32L452RCIx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32L4xx_DFP.2.6.1</PackID>
<PackID>Keil.STM32L4xx_DFP.2.5.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00008000) IROM(0x08000000,0x00040000) CPUTYPE("Cortex-M4") FPU2 DSP CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<TargetCommonOption>
<Device>STM32L452RCIx</Device>
<Vendor>STMicroelectronics</Vendor>
<PackID>Keil.STM32L4xx_DFP.2.6.1</PackID>
<PackID>Keil.STM32L4xx_DFP.2.5.0</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00008000) IROM(0x08000000,0x00040000) CPUTYPE("Cortex-M4") FPU2 DSP CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.placeholder

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@



// - include guard ----------------------------------------------------------------------------------------------------
#ifndef __STM32HAL_STG_H_
#define __STM32HAL_STG_H_

#ifdef __cplusplus
extern "C" {
#endif



// --------------------------------------------------------------------------------------------------------------------
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------


// <h> STACK & HEAP
// <i> It contains stack and heap size and some externally functions

// <o> stack size <0x0-0xFFFFFFFF:8>
// <i> define how much stack you want.
#ifndef STM32HAL_STG_STACKSIZE
#define STM32HAL_STG_STACKSIZE 0x00003000
#endif

// <o> heap size <0x0-0xFFFFFFFF:8>
// <i> define how much heap you want.
#ifndef STM32HAL_STG_HEAPSIZE
#define STM32HAL_STG_HEAPSIZE 0x00008000
#endif

// </h>SYS module




// --------------------------------------------------------------------------------------------------------------------
//------------- <<< end of configuration section >>> ------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------



#ifdef __cplusplus
} // closing brace for extern "C"
#endif

#endif // include-guard


// - end-of-file (leave a blank line after)----------------------------------------------------------------------------


Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/******************************************************************************/
/* STM32_TP.ini: STM32 Debugger Initialization File */
/******************************************************************************/
// <<< Use Configuration Wizard in Context Menu >>> //
/******************************************************************************/
/* This file is part of the uVision/ARM development tools. */
/* Copyright (c) 2005-2009 Keil Software. All rights reserved. */
/* This software may only be used under the terms of a valid, current, */
/* end user licence from KEIL for a compatible version of KEIL software */
/* development tools. Nothing else gives you the right to use this software. */
/******************************************************************************/


FUNC void DebugSetup (void) {
_WDWORD(0x40023830, _RDWORD(0x40023830) | 0x00000010); // RCC_AHB1ENR: IO port E clock enable
_WDWORD(0x40021000, 0x00002AA0); // GPIOE_MODER: PE2..PE6 = Alternate function mode
_WDWORD(0x40021008, 0x00003FF0); // GPIOE_OSPEEDR: PE2..PE6 = 100 MHz speed
_WDWORD(0x4002100C, 0x00000000); // GPIOE_PUPDR: PE2..PE6 = No Pull-up/Pull-down
_WDWORD(0x40021020, 0x00000000); // GPIOE_AFRL: PE2..PE6 = AF0

// <h> Debug MCU Configuration
// <o1.0> DBG_SLEEP <i> Debug Sleep Mode
// <o1.1> DBG_STOP <i> Debug Stop Mode
// <o1.2> DBG_STANDBY <i> Debug Standby Mode
// <o1.5> TRACE_IOEN <i> Trace I/O Enable
// <o1.6..7> TRACE_MODE <i> Trace Mode
// <0=> Asynchronous
// <1=> Synchronous: TRACEDATA Size 1
// <2=> Synchronous: TRACEDATA Size 2
// <3=> Synchronous: TRACEDATA Size 4
// </h>
_WDWORD(0xE0042004, 0x00000027); // DBGMCU_CR

// <h> Debug MCU APB1 Freeze
// <o1.0> DBG_TIM2_STOP <i> Timer 2 Stopped when Core is halted
// <o1.1> DBG_TIM3_STOP <i> Timer 3 Stopped when Core is halted
// <o1.2> DBG_TIM4_STOP <i> Timer 4 Stopped when Core is halted
// <o1.3> DBG_TIM5_STOP <i> Timer 5 Stopped when Core is halted
// <o1.4> DBG_TIM6_STOP <i> Timer 6 Stopped when Core is halted
// <o1.5> DBG_TIM7_STOP <i> Timer 7 Stopped when Core is halted
// <o1.6> DBG_TIM12_STOP <i> Timer 12 Stopped when Core is halted
// <o1.7> DBG_TIM13_STOP <i> Timer 13 Stopped when Core is halted
// <o1.8> DBG_TIM14_STOP <i> Timer 14 Stopped when Core is halted
// <o1.10> DBG_RTC_STOP <i> RTC Stopped when Core is halted
// <o1.11> DBG_WWDG_STOP <i> Window Watchdog Stopped when Core is halted
// <o1.12> DBG_IWDG_STOP <i> Independent Watchdog Stopped when Core is halted
// <o1.21> DBG_I2C1_SMBUS_TIMEOUT <i> I2C1 SMBUS Timeout Mode Stopped when Core is halted
// <o1.22> DBG_I2C2_SMBUS_TIMEOUT <i> I2C2 SMBUS Timeout Mode Stopped when Core is halted
// <o1.23> DBG_I2C3_SMBUS_TIMEOUT <i> I2C3 SMBUS Timeout Mode Stopped when Core is halted
// <o1.25> DBG_CAN1_STOP <i> CAN1 Stopped when Core is halted
// <o1.26> DBG_CAN2_STOP <i> CAN2 Stopped when Core is halted
// </h>
_WDWORD(0xE0042008, 0x06E01DFF); // DBGMCU_APB1_FZ

// <h> Debug MCU APB2 Freeze
// <o1.0> DBG_TIM1_STOP <i> Timer 1 Stopped when Core is halted
// <o1.1> DBG_TIM8_STOP <i> Timer 8 Stopped when Core is halted
// <o1.16> DBG_TIM9_STOP <i> Timer 9 Stopped when Core is halted
// <o1.17> DBG_TIM10_STOP <i> Timer 10 Stopped when Core is halted
// <o1.18> DBG_TIM11_STOP <i> Timer 11 Stopped when Core is halted
// </h>
_WDWORD(0xE004200C, 0x00070003); // DBGMCU_APB2_FZ

}

// Executed after reset via uVision's 'Reset'-button
FUNC void OnResetExec (void) {
DebugSetup();
}

DebugSetup(); // Debugger Setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
;#! armcc -E
; the above must be on teh first line of teh scatter file ...

; Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
; Author: Marco Accame
; email: [email protected]
; website: www.robotcub.org
; Permission is granted to copy, distribute, and/or modify this program
; under the terms of the GNU General Public License, version 2 or any
; later version published by the Free Software Foundation.
;
; A copy of the license can be found at
; http://www.robotcub.org/icub/license/gpl.txt
;
; This program is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
; Public License for more details
; due to a bug in linker (in some older versions), you may need to put the whole path ... thus change it by hand
;#include "D:\#inhere\sdl\embedded\arm\embody\body\embenv\envcom\eEmemorymap.h"
;#include "..\..\cfg\eEmemorymap.h"


; flash starts from xx and its size is xxx
; 128k is: LR_IROM1 0x08020000 0x00020000 { ; load region size_region
; if we want to start at 80k, with size 256-80-4 and have a hole of 4k on top ... LR_IROM1 0x08014000 0x0002B000 { ; load region size_region
;LR_IROM1 0x08014000 0x0002B000 { ; load region size_region
LR_IROM1 0x08020000 0x0001F000 { ; load region size_region
ER_IROM1 0x08020000 0x0001F000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x20000020 0xBFE0 { ; RW data
.ANY (+RW +ZI)
}
}




Loading