cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Code with PinMap Wizard for Multi IDE Green Hill Compiler

dominik2
Associate II
Posted on May 19, 2015 at 13:28

I wonder if it is possible to generate C Code with the PinMap Wizard for use with the Multi IDE Green Hill Compiler and if that is possible how to integrate the code to a Multi IDE Project?

Thanks in advance,

Dominik
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on May 21, 2015 at 11:48 Hello Dominik , Sorry for my late answer. I have never done this step. i think that it is possible. From SPC5Studio, you should reuse board.c / board.h generating from Pinmap Wizard after saving and generation from your configuration editor . and reimport the function in your greenhills application. the init is done by HAL :

palInit(&pal_default_config);

and

/* Initial setup of all defined pads, the list is terminated by a {-1, 0, 0}.*/
static
const
spc_siu_init_t spc_siu_init[] = {
{PCR(PORT_A, PA_BUTTON), PAL_LOW, PAL_MODE_INPUT_PULLUP},
{PCR(PORT_B, PB_LIN0_TDX), PAL_HIGH, PAL_MODE_OUTPUT_ALTERNATE(1)},
{PCR(PORT_B, PB_LIN0_RDX), PAL_HIGH, PAL_MODE_INPUT},
{PCR(PORT_A, PIN_GPIO2), PAL_LOW, PAL_MODE_INPUT},
{PCR(PORT_B, PB_TRIMMER), PAL_LOW, PAL_MODE_INPUT_ANALOG},
{PCR(PORT_A, PIN_GPIO3), PAL_HIGH, PAL_MODE_INPUT},
{PCR(PORT_C, PC_LED8), PAL_LOW, PAL_MODE_OUTPUT_PUSHPULL},
{PCR(PORT_C, PC_LED7), PAL_LOW, PAL_MODE_OUTPUT_PUSHPULL},
{-1, 0, 0}
};
/* Initialization array for the PSMI registers.*/
static
const
uint8_t spc_padsels_init[SPC5_SIUL_NUM_PADSELS] = {
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 
};
/**
* @brief PAL setup.
*/
const
PALConfig pal_default_config = {
PAL_MODE_UNCONNECTED,
spc_siu_init,
spc_padsels_init
};

Best Regards Erwan