MDK5 and STM32Cube

 

 

D:\Workspace\........\RTE\Device>STM32CubeMX.exe

-s project.script

-tpl_path C:\Keil5\ARM\Pack\Keil\STM32F4xx_DFP\2.5.0\MDK\CubeMX\

-dest_path [D:\Workspace\........\RTE\Device\]STM32F407IGHx\

 

使用 D:\Workspace\........\RTE\Device\project.script

 

load STM32F405RGTx 
project name STCubeGenerated 
project toolchain "MDK-ARM V5" 
project path Z:\MDKARM\RTE\Device\STM32F405RGTx\ 

  

生成 D:\Workspace\........\RTE\Device\STM32F407IGHx\MX_Device.h

 

/******************************************************************************
 * File Name   : MX_Device.h
 * Date        : 08/10/2017 11:03:38
 * Description : STM32Cube MX parameter definitions
 * Note        : This file is generated by STM32CubeMX (DO NOT EDIT!)
 ******************************************************************************/

#ifndef __MX_DEVICE_H
#define __MX_DEVICE_H

/*---------------------------- Clock Configuration ---------------------------*/

#define MX_LSI_VALUE                            32000
#define MX_LSE_VALUE                            32768
#define MX_HSI_VALUE                            16000000
#define MX_HSE_VALUE                            25000000
#define MX_EXTERNAL_CLOCK_VALUE                 12288000
#define MX_PLLCLKFreq_Value                     96000000
#define MX_SYSCLKFreq_VALUE                     16000000
#define MX_HCLKFreq_Value                       16000000
#define MX_FCLKCortexFreq_Value                 16000000
#define MX_CortexFreq_Value                     16000000
#define MX_AHBFreq_Value                        16000000
#define MX_APB1Freq_Value                       16000000
#define MX_APB2Freq_Value                       16000000
#define MX_APB1TimFreq_Value                    16000000
#define MX_APB2TimFreq_Value                    16000000
#define MX_48MHZClocksFreq_Value                48000000
#define MX_EthernetFreq_Value                   16000000
#define MX_I2SClocksFreq_Value                  96000000
#define MX_RTCFreq_Value                        32000
#define MX_WatchDogFreq_Value                   32000
#define MX_MCO1PinFreq_Value                    16000000
#define MX_MCO2PinFreq_Value                    16000000

/*-------------------------------- CAN1       --------------------------------*/

#define MX_CAN1                                 1

/* GPIO Configuration */

/* Pin PA11 */
#define MX_CAN1_RX_GPIO_Speed                   GPIO_SPEED_FREQ_VERY_HIGH
#define MX_CAN1_RX_Pin                          PA11
#define MX_CAN1_RX_GPIOx                        GPIOA
#define MX_CAN1_RX_GPIO_PuPd                    GPIO_NOPULL
#define MX_CAN1_RX_GPIO_Pin                     GPIO_PIN_11
#define MX_CAN1_RX_GPIO_AF                      GPIO_AF9_CAN1
#define MX_CAN1_RX_GPIO_Mode                    GPIO_MODE_AF_PP

/* Pin PA12 */
#define MX_CAN1_TX_GPIO_Speed                   GPIO_SPEED_FREQ_VERY_HIGH
#define MX_CAN1_TX_Pin                          PA12
#define MX_CAN1_TX_GPIOx                        GPIOA
#define MX_CAN1_TX_GPIO_PuPd                    GPIO_NOPULL
#define MX_CAN1_TX_GPIO_Pin                     GPIO_PIN_12
#define MX_CAN1_TX_GPIO_AF                      GPIO_AF9_CAN1
#define MX_CAN1_TX_GPIO_Mode                    GPIO_MODE_AF_PP

/*-------------------------------- SYS        --------------------------------*/

#define MX_SYS                                  1

/* GPIO Configuration */

/*-------------------------------- NVIC       --------------------------------*/

#define MX_NVIC                                 1

/*-------------------------------- GPIO       --------------------------------*/

#define MX_GPIO                                 1

/* GPIO Configuration */

/* Pin PB1 */
#define MX_PB1_GPIO_Speed                       GPIO_SPEED_FREQ_LOW
#define MX_PB1_Pin                              PB1
#define MX_PB1_GPIOx                            GPIOB
#define MX_PB1_PinState                         GPIO_PIN_RESET
#define MX_PB1_GPIO_PuPd                        GPIO_NOPULL
#define MX_PB1_GPIO_Pin                         GPIO_PIN_1
#define MX_PB1_GPIO_ModeDefaultOutputPP         GPIO_MODE_OUTPUT_PP

/* Pin PB0 */
#define MX_PB0_GPIO_Speed                       GPIO_SPEED_FREQ_LOW
#define MX_PB0_Pin                              PB0
#define MX_PB0_GPIOx                            GPIOB
#define MX_PB0_PinState                         GPIO_PIN_RESET
#define MX_PB0_GPIO_PuPd                        GPIO_NOPULL
#define MX_PB0_GPIO_Pin                         GPIO_PIN_0
#define MX_PB0_GPIO_ModeDefaultOutputPP         GPIO_MODE_OUTPUT_PP

#endif  /* __MX_DEVICE_H */

  

生成 D:\Workspace\........\RTE\Device\STM32F407IGHx\FrameworkCubeMX.gpdsc

 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- ******************************************************************************
 * File Name   : FrameworkCubeMX.gpdsc
 * Date        : 08/10/2017 11:03:38
 * Description : Generator PDSC File generated by STM32CubeMX (DO NOT EDIT!)
 ****************************************************************************** -->

<package xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="1.0" xs:noNamespaceSchemaLocation="PACK.xsd">
  <vendor>Keil</vendor>
  <name>FrameworkCubeMX</name>
  <description>STM32CubeMX generated pack description</description>
  <url>project-path</url>
  <releases>
    <release version="1.0.0">
     - Generated: 08/10/2017 11:03:38
    </release>
  </releases>
  <generators>
    <generator id="STM32CubeMX" Gvendor="STMicroelectronics" Gtool="STM32CubeMX" Gversion="4.10.0">
      <description>STM32CubeMX Environment</description>
      <select Dname="STM32F405RGTx" Dvendor="STMicroelectronics:13"/>
      <command>$SMDK\CubeMX\STM32CubeMXLauncher</command>
      <workingDir>$PRTE\Device\STM32F405RGTx</workingDir>
      <project_files>
        <file category="source" name="STCubeGenerated/Src/main.c" />
        <file category="header" name="STCubeGenerated/Inc/stm32f4xx_it.h"/>
        <file category="source" name="STCubeGenerated/Src/stm32f4xx_it.c"/>
      </project_files>
    </generator>
  </generators>
  <taxonomy>
    <description Cclass="Device" Cgroup="STM32Cube Framework" generator="STM32CubeMX">STM32Cube Framework</description>
  </taxonomy>
  <conditions>
    <condition id="STCubeMX">
      <description>Condition to include CMSIS core and Device Startup components</description>
      <require Dvendor="STMicroelectronics:13" Dname="STM32F4*"/>
      <require Cclass="CMSIS"  Cgroup="CORE"          Csub=""/>
      <require Cclass="Device" Cgroup="Startup"/>
      <require Cclass="Device" Cgroup="STM32Cube HAL" Csub="CAN"/>
      <require Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO"/>
    </condition>
  </conditions>
  <components>
    <component generator="STM32CubeMX" Cvendor="Keil" Cclass="Device" Cgroup="STM32Cube Framework" Csub="STM32CubeMX" Cversion="1.0.0" condition="STCubeMX">
      <description>Configuration via STM32CubeMX</description>
      <RTE_Components_h>
        #define RTE_DEVICE_FRAMEWORK_CUBE_MX
      </RTE_Components_h>
      <files>
        <file category="header" name="MX_Device.h"/>
        <file category="header" name="STCubeGenerated/Inc/stm32f4xx_hal_conf.h"/>
        <file category="source" name="STCubeGenerated/Src/stm32f4xx_hal_msp.c"/>
      </files>
    </component>
  </components>
</package>

  

dest_path = D:\Workspace\........\RTE\Device\STM32F407IGHx\

 

STM32CubeMX 工程目录:D:\Workspace\........\RTE\Device\STM32F407IGHx\STCubeGenerated\

Keil -------------工程目录:D:\Workspace\........\RTE\Device\STM32F407IGHx\STCubeGenerated\MDK-ARM

 

MX_Device.h

/******************************************************************************
 * File Name   : MX_Device.h
 * Date        : 07/08/2015 18:06:21
 * Description : STM32Cube MX parameter definitions
 * Note        : This file is generated by STM32CubeMX (DO NOT EDIT!)
 ******************************************************************************/

#ifndef __MX_DEVICE_H
#define __MX_DEVICE_H

/*---------------------------- Clock Configuration ---------------------------*/

#define MX_LSI_VALUE                            32000
#define MX_LSE_VALUE                            32768
#define MX_HSI_VALUE                            16000000
#define MX_HSE_VALUE                            25000000
#define MX_EXTERNAL_CLOCK_VALUE                 12288000
#define MX_SYSCLKFreq_VALUE                     16000000
#define MX_HCLKFreq_Value                       16000000
#define MX_FCLKCortexFreq_Value                 16000000
#define MX_CortexFreq_Value                     16000000
#define MX_AHBFreq_Value                        16000000
#define MX_APB1Freq_Value                       16000000
#define MX_APB2Freq_Value                       16000000
#define MX_APB1TimFreq_Value                    16000000
#define MX_APB2TimFreq_Value                    16000000
#define MX_48MHZClocksFreq_Value                48000000
#define MX_EthernetFreq_Value                   16000000
#define MX_I2SClocksFreq_Value                  96000000
#define MX_WatchDogFreq_Value                   32000
#define MX_RTCFreq_Value                        32000
#define MX_MCO1PinFreq_Value                    16000000
#define MX_MCO2PinFreq_Value                    16000000

/*-------------------------------- NVIC       --------------------------------*/

#define MX_NVIC                                 1

/*-------------------------------- USART1     --------------------------------*/

#define MX_USART1                               1

#define MX_USART1_VM                            VM_ASYNC

/* GPIO Configuration */

/* Pin PB7 */
#define MX_USART1_RX_Pin                        PB7
#define MX_USART1_RX_GPIO_AF                    GPIO_AF7_USART1
#define MX_USART1_RX_GPIO_Speed                 GPIO_SPEED_HIGH
#define MX_USART1_RX_GPIO_PuPd                  GPIO_PULLUP
#define MX_USART1_RX_GPIOx                      GPIOB
#define MX_USART1_RX_GPIO_Mode                  GPIO_MODE_AF_PP
#define MX_USART1_RX_GPIO_Pin                   GPIO_PIN_7

/* Pin PB6 */
#define MX_USART1_TX_Pin                        PB6
#define MX_USART1_TX_GPIO_AF                    GPIO_AF7_USART1
#define MX_USART1_TX_GPIO_Speed                 GPIO_SPEED_HIGH
#define MX_USART1_TX_GPIO_PuPd                  GPIO_PULLUP
#define MX_USART1_TX_GPIOx                      GPIOB
#define MX_USART1_TX_GPIO_Mode                  GPIO_MODE_AF_PP
#define MX_USART1_TX_GPIO_Pin                   GPIO_PIN_6

/*-------------------------------- USART2     --------------------------------*/

#define MX_USART2                               1

#define MX_USART2_VM                            VM_ASYNC

/* GPIO Configuration */

/* Pin PD5 */
#define MX_USART2_TX_Pin                        PD5
#define MX_USART2_TX_GPIO_AF                    GPIO_AF7_USART2
#define MX_USART2_TX_GPIO_Speed                 GPIO_SPEED_HIGH
#define MX_USART2_TX_GPIO_PuPd                  GPIO_PULLUP
#define MX_USART2_TX_GPIOx                      GPIOD
#define MX_USART2_TX_GPIO_Mode                  GPIO_MODE_AF_PP
#define MX_USART2_TX_GPIO_Pin                   GPIO_PIN_5

/* Pin PD6 */
#define MX_USART2_RX_Pin                        PD6
#define MX_USART2_RX_GPIO_AF                    GPIO_AF7_USART2
#define MX_USART2_RX_GPIO_Speed                 GPIO_SPEED_HIGH
#define MX_USART2_RX_GPIO_PuPd                  GPIO_PULLUP
#define MX_USART2_RX_GPIOx                      GPIOD
#define MX_USART2_RX_GPIO_Mode                  GPIO_MODE_AF_PP
#define MX_USART2_RX_GPIO_Pin                   GPIO_PIN_6

/*-------------------------------- GPIO       --------------------------------*/

#define MX_GPIO                                 1

/* GPIO Configuration */

#endif  /* __MX_DEVICE_H */

 

posted @ 2015-08-07 19:48  IAmAProgrammer  阅读(2313)  评论(0编辑  收藏  举报