Skip to content

Commit

Permalink
removed segger, fixed gcc makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Vostrenkov committed Oct 17, 2020
1 parent 8b9eef5 commit fc5bf9b
Show file tree
Hide file tree
Showing 13 changed files with 1,088 additions and 634 deletions.
Binary file modified MDK-ARM/FreeJoy.bin
Binary file not shown.
69 changes: 69 additions & 0 deletions MDK-ARM/FreeJoy.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,75 @@
</Group>
<Group>
<GroupName>SEGGER</GroupName>
<GroupOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<GroupArmAds>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>
<uGnu>2</uGnu>
<useXO>2</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>2</vShortEn>
<vShortWch>2</vShortWch>
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>2</interw>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<thumb>2</thumb>
<SplitLS>2</SplitLS>
<SwStkChk>2</SwStkChk>
<NoWarn>2</NoWarn>
<uSurpInc>2</uSurpInc>
<useXO>2</useXO>
<uClangAs>2</uClangAs>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
</GroupArmAds>
</GroupOption>
<Files>
<File>
<FileName>SEGGER_SYSVIEW.c</FileName>
Expand Down
6 changes: 0 additions & 6 deletions application/Src/analog.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

#include "analog.h"

#include "SEGGER_SYSVIEW.h"

#include <string.h>
#include <math.h>
#include "tle5011.h"
Expand Down Expand Up @@ -647,7 +645,6 @@ void AxesInit (dev_config_t * p_dev_config)
*/
void ADC_Conversion (void)
{
SEGGER_SYSVIEW_RecordVoid(45);

if (adc_cnt > 0)
{
Expand Down Expand Up @@ -683,7 +680,6 @@ void ADC_Conversion (void)
adc_data[j] /= ADC_CONV_NUM;
}
}
SEGGER_SYSVIEW_RecordEndCall(45);
}

/**
Expand All @@ -693,7 +689,6 @@ void ADC_Conversion (void)
*/
void AxesProcess (dev_config_t * p_dev_config)
{
SEGGER_SYSVIEW_RecordVoid(46);

int32_t tmp[MAX_AXIS_NUM];
float tmpf;
Expand Down Expand Up @@ -1173,7 +1168,6 @@ void AxesProcess (dev_config_t * p_dev_config)
NVIC_EnableIRQ(TIM2_IRQn);
}

SEGGER_SYSVIEW_RecordEndCall(46);
}

/**
Expand Down
12 changes: 0 additions & 12 deletions application/Src/buttons.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include "buttons.h"
#include "string.h"

#include "SEGGER_SYSVIEW.h"

uint8_t raw_buttons_data[MAX_BUTTONS_NUM];
physical_buttons_state_t physical_buttons_state[MAX_BUTTONS_NUM];
logical_buttons_state_t logical_buttons_state[MAX_BUTTONS_NUM];
Expand Down Expand Up @@ -167,7 +165,6 @@ static void LogicalButtonProcessTimer (logical_buttons_state_t * p_button_state,
*/
void LogicalButtonProcessState (logical_buttons_state_t * p_button_state, uint8_t * pov_buf, dev_config_t * p_dev_config, uint8_t num)
{
SEGGER_SYSVIEW_RecordVoid(49);

uint32_t millis;
uint8_t pov_group = 0;
Expand Down Expand Up @@ -566,7 +563,6 @@ void LogicalButtonProcessState (logical_buttons_state_t * p_button_state, uint8_
default:
break;
}
SEGGER_SYSVIEW_RecordEndCall(49);
}

/**
Expand Down Expand Up @@ -721,8 +717,6 @@ void SingleButtonsGet (uint8_t * raw_button_data_buf, dev_config_t * p_dev_confi

uint8_t ButtonsReadPhysical(dev_config_t * p_dev_config, uint8_t * p_buf)
{
SEGGER_SYSVIEW_RecordVoid(47);

uint8_t pos = 0;

// Getting physical buttons states
Expand All @@ -733,8 +727,6 @@ uint8_t ButtonsReadPhysical(dev_config_t * p_dev_config, uint8_t * p_buf)
a2b_last = pos;
SingleButtonsGet(p_buf, p_dev_config, &pos);

SEGGER_SYSVIEW_RecordEndCall(47);

return pos;
}

Expand All @@ -745,8 +737,6 @@ uint8_t ButtonsReadPhysical(dev_config_t * p_dev_config, uint8_t * p_buf)
*/
void ButtonsReadLogical (dev_config_t * p_dev_config)
{
SEGGER_SYSVIEW_RecordVoid(48);

// Process regular buttons
for (uint8_t i=0; i<MAX_BUTTONS_NUM; i++)
{
Expand Down Expand Up @@ -962,8 +952,6 @@ void ButtonsReadLogical (dev_config_t * p_dev_config)
break;
}
}

SEGGER_SYSVIEW_RecordEndCall(48);
}

/**
Expand Down
5 changes: 0 additions & 5 deletions application/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
/* Includes ------------------------------------------------------------------*/
#include "main.h"

#include "SEGGER_SYSVIEW.h"

#include "periphery.h"
#include "config.h"
#include "analog.h"
Expand Down Expand Up @@ -57,9 +55,6 @@ int main(void)

SysTick_Init();

// Configure and initialize SystemView
SEGGER_SYSVIEW_Conf();

// getting configuration from flash memory
DevConfigGet(&dev_config);

Expand Down
32 changes: 1 addition & 31 deletions application/Src/stm32f10x_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x_it.h"

#include "SEGGER_SYSVIEW.h"

#include "usb_istr.h"
#include "usb_lib.h"
#include "periphery.h"
Expand Down Expand Up @@ -163,13 +161,10 @@ void PendSV_Handler(void)
*/
void SysTick_Handler(void)
{
SEGGER_SYSVIEW_RecordEnterISR();

if (TimingDelay != 0x00)
{
TimingDelay--;
}
SEGGER_SYSVIEW_RecordExitISR();
}

/******************************************************************************/
Expand All @@ -182,8 +177,6 @@ void SysTick_Handler(void)

void TIM2_IRQHandler(void)
{
SEGGER_SYSVIEW_RecordVoid(33);

static uint8_t btn_num = 0;
uint8_t physical_buttons_data[MAX_BUTTONS_NUM];
joy_report_t joy_report;
Expand Down Expand Up @@ -289,7 +282,6 @@ void TIM2_IRQHandler(void)
if (sensors[i].type == TLE5011)
{
TLE501x_StartDMA(&sensors[i]);
SEGGER_SYSVIEW_RecordEndCall(33);
return;
}
else if (sensors[i].type == MCP3201 ||
Expand All @@ -303,21 +295,18 @@ void TIM2_IRQHandler(void)
else if (sensors[i].type == MLX90393_SPI)
{
MLX90393_StartDMA(&sensors[i]);
SEGGER_SYSVIEW_RecordEndCall(33);
return;
}
}
}
}

}
SEGGER_SYSVIEW_RecordEndCall(33);
}

// SPI Rx Complete
void DMA1_Channel2_IRQHandler(void)
{
SEGGER_SYSVIEW_RecordVoid(34);

uint8_t i=0;

Expand Down Expand Up @@ -352,7 +341,6 @@ void DMA1_Channel2_IRQHandler(void)
if (sensors[i].curr_channel < 1)
{
MCP320x_StartDMA(&sensors[i], sensors[i].curr_channel + 1);
SEGGER_SYSVIEW_RecordEndCall(34);
return;
}
i++;
Expand All @@ -364,7 +352,6 @@ void DMA1_Channel2_IRQHandler(void)
if (sensors[i].curr_channel < 3)
{
MCP320x_StartDMA(&sensors[i], sensors[i].curr_channel + 1);
SEGGER_SYSVIEW_RecordEndCall(34);
return;
}
i++;
Expand All @@ -376,7 +363,6 @@ void DMA1_Channel2_IRQHandler(void)
if (sensors[i].curr_channel < 7)
{
MCP320x_StartDMA(&sensors[i], sensors[i].curr_channel + 1);
SEGGER_SYSVIEW_RecordEndCall(34);
return;
}
i++;
Expand All @@ -396,7 +382,6 @@ void DMA1_Channel2_IRQHandler(void)
if (sensors[i].type == TLE5011)
{
TLE501x_StartDMA(&sensors[i]);
SEGGER_SYSVIEW_RecordEndCall(34);
return;
}
else if (sensors[i].type == MCP3201 ||
Expand All @@ -405,26 +390,21 @@ void DMA1_Channel2_IRQHandler(void)
sensors[i].type == MCP3208)
{
MCP320x_StartDMA(&sensors[i], 0);
SEGGER_SYSVIEW_RecordEndCall(34);
return;
}
else if (sensors[i].type == MLX90393_SPI)
{
MLX90393_StartDMA(&sensors[i]);
SEGGER_SYSVIEW_RecordEndCall(34);
return;
}
}
}
}
SEGGER_SYSVIEW_RecordEndCall(34);
}

// SPI Tx Complete
void DMA1_Channel3_IRQHandler(void)
{
SEGGER_SYSVIEW_RecordVoid(35);

uint8_t i=0;

if (DMA_GetITStatus(DMA1_IT_TC3))
Expand All @@ -447,19 +427,15 @@ void DMA1_Channel3_IRQHandler(void)
{
SPI_HalfDuplex_Receive(&sensors[i].data[1], 5, TLE5011_SPI_MODE);
}
SEGGER_SYSVIEW_RecordEndCall(35);
return;
}
}
}
SEGGER_SYSVIEW_RecordEndCall(35);
}

// I2C error
void I2C1_ER_IRQHandler(void)
{
SEGGER_SYSVIEW_RecordVoid(36);

__IO uint32_t SR1Register =0;

/* Read the I2C1 status register */
Expand Down Expand Up @@ -494,8 +470,6 @@ void I2C1_ER_IRQHandler(void)
I2C1->CR1 |= I2C_CR1_SWRST;
I2C1->CR1 &= ~I2C_CR1_SWRST;
I2C_Start();

SEGGER_SYSVIEW_RecordEndCall(36);
}


Expand All @@ -504,12 +478,8 @@ void I2C1_ER_IRQHandler(void)
* @brief This function handles USB low priority or CAN RX0 interrupts.
*/
void USB_LP_CAN1_RX0_IRQHandler(void)
{
SEGGER_SYSVIEW_RecordVoid(37);

{
USB_Istr();

SEGGER_SYSVIEW_RecordEndCall(37);
}

/**
Expand Down
Loading

0 comments on commit fc5bf9b

Please sign in to comment.