Skip to content

Commit 61c46fe

Browse files
author
abusous2000
committed
Made minor changes to makefile & re-tested
1 parent d008735 commit 61c46fe

8 files changed

Lines changed: 44 additions & 30 deletions

File tree

cfg/stm32f769i_discovery/chconf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#define _CHIBIOS_RT_CONF_
3232
#define _CHIBIOS_RT_CONF_VER_6_1_
3333
#define bool_t bool
34-
#define DEBUG_TRACE_PRINT TRUE
35-
#define CHPRINTF_USE_FLOAT TRUE
36-
#define PORT_ENABLE_GUARD_PAGES TRUE
34+
//#define DEBUG_TRACE_PRINT TRUE
35+
//#define CHPRINTF_USE_FLOAT TRUE
36+
//#define PORT_ENABLE_GUARD_PAGES TRUE
3737
/*===========================================================================*/
3838
/**
3939
* @name System timers settings

libmad/decoder.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void mad_decoder_init(struct mad_decoder *decoder, void *data,
9494
}
9595

9696
int mad_decoder_finish(struct mad_decoder *decoder)
97-
{
97+
{(void)decoder;
9898
# if defined(USE_ASYNC)
9999
if (decoder->mode == MAD_DECODER_MODE_ASYNC && decoder->async.pid) {
100100
pid_t pid;
@@ -569,6 +569,7 @@ int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode)
569569
int mad_decoder_message(struct mad_decoder *decoder,
570570
void *message, unsigned int *len)
571571
{
572+
(void)len;(void)message;(void)decoder;
572573
# if defined(USE_ASYNC)
573574
if (decoder->mode != MAD_DECODER_MODE_ASYNC ||
574575
send(decoder->async.out, message, *len) != MAD_FLOW_CONTINUE ||

libmad/frame.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
315315
if (!stream->sync)
316316
ptr = stream->this_frame;
317317

318-
if (end - ptr < stream->skiplen) {
318+
if (end - ptr < (signed int)stream->skiplen) {
319319
stream->skiplen -= end - ptr;
320320
stream->next_frame = end;
321321

libmad/layer3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
10531053
break;
10541054

10551055
case 15:
1056-
if (cachesz < linbits + 2) {
1056+
if (cachesz < (signed int)linbits + 2) {
10571057
bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
10581058
cachesz += 16;
10591059
bits_left -= 16;
@@ -1088,7 +1088,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xr[576],
10881088
break;
10891089

10901090
case 15:
1091-
if (cachesz < linbits + 1) {
1091+
if (cachesz < (signed int)linbits + 1) {
10921092
bitcache = (bitcache << 16) | mad_bit_read(&peek, 16);
10931093
cachesz += 16;
10941094
bits_left -= 16;

libmad/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# include "global.h"
2727

2828
# include <stdio.h>
29-
29+
# include <stdlib.h>
3030
# ifdef HAVE_ASSERT_H
3131
# include <assert.h>
3232
# endif

main.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,6 @@ AudioPlayerDriverITF_Typedef *pAudioPlayerDriverITF;
2525
thread_t *mainThd;
2626

2727
static void initDrivers(void);
28-
#if S4E_USE_WIFI_MODULE_THD != 0
29-
/* WiFi Serial configuration. */
30-
static const SerialConfig wifiSerialvfg = {
31-
WIFI_SERIALBAUD_RATE,
32-
0,
33-
USART_CR2_STOP1_BITS,
34-
0
35-
};
36-
#endif
37-
3828
#if HAL_USE_SERIAL != 0
3929

4030
/* VCP Serial configuration. */
@@ -79,7 +69,6 @@ int main(void) {
7969
initActonEventThd();
8070
initButtonsLEDs();
8171
#if S4E_USE_WIFI_MODULE_THD != 0
82-
sdStart(&WIFI_SD, &wifiSerialvfg);
8372
initWifiCommunicationThd();
8473
#endif
8574
#if defined(LINE_LED_RED)
@@ -125,6 +114,9 @@ static void initDrivers(void){
125114
ssd130InitAndConfig("MP3Player w/ STM32F7");
126115
#endif
127116

117+
#if HAL_USE_RTC != 0
118+
RTCInit();
119+
#endif
128120
return;
129121
}
130122
static bool pauseMsgSent = false;

make/stm32f769i_discovery.make

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,12 @@ STMHAL = STM32F7xx_HAL_Driver
9595
BOARD_NAME := stm32f769i_discovery
9696
STRUTS4EMBEDDED :=$(CHIBIOS)/demos/STM32/Struts4Embedded/source/Struts4Embedded
9797
include $(STRUTS4EMBEDDED)/CommonS4EVars.mk
98-
99-
98+
INCLUDE_SEGGER_JLINK := "no"
99+
INCLUDE_SEGGER_JLINK_VALUE :=0
100+
USE_MAC := "yes"
101+
USE_AE_SHELL := "yes"
102+
USE_AE_SHELL_VALUE := 0
103+
USE_FATFS := "yes"
100104

101105
# Licensing files.
102106
include $(CHIBIOS)/os/license/license.mk
@@ -113,16 +117,30 @@ include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
113117
# Auto-build files in ./source recursively.
114118
include $(CHIBIOS)/tools/mk/autobuild.mk
115119
# Other files (optional).
116-
#include $(CHIBIOS)/test/lib/test.mk
117-
#include $(CHIBIOS)/test/rt/rt_test.mk
118-
#include $(CHIBIOS)/test/oslib/oslib_test.mk
120+
ifeq ($(USE_AE_SHELL),"yes")
121+
include $(CHIBIOS)/test/lib/test.mk
122+
include $(CHIBIOS)/test/rt/rt_test.mk
123+
include $(CHIBIOS)/test/oslib/oslib_test.mk
124+
include $(CHIBIOS)/os/various/shell/shell.mk
125+
USE_AE_SHELL_VALUE := 1
126+
endif
119127
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
120128
include $(CHIBIOS_CONTRIB)/os/common/ports/ARMCMx/compilers/GCC/utils/fault_handlers_v7m.mk
129+
130+
include $(STRUTS4EMBEDDED)/Struts4Embedded.mk
131+
ifeq ($(USE_FATFS),"yes")
121132
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
133+
endif
134+
#STARTUPLD = /os/common/startup/ARMCMx/compilers/GCC/ld
135+
ifeq ($(USE_MAC),"yes")
122136
include $(CHIBIOS)/os/various/lwip_bindings/lwip.mk
123-
include $(STRUTS4EMBEDDED)/Struts4Embedded.mk
124-
include $(MQTTCLIENT)/MQTTClient.mk
125-
include $(CONTROLS)/Controls.mk
137+
endif
138+
ifeq ($(INCLUDE_SEGGER_JLINK),"yes")
139+
include $(CHIBIOS_CONTRIB)/os/various/segger_bindings/segger_rtt.mk
140+
include $(CHIBIOS_CONTRIB)/os/various/segger_bindings/segger_systemview.mk
141+
INCLUDE_SEGGER_JLINK_VALUE := 1
142+
endif
143+
126144
# Define linker script file here
127145
include ./libmad/mp3.mk
128146
include $(GFXLIB)/gfx.mk
@@ -164,8 +182,11 @@ CPPWARN = -Wall -Wextra -Wundef
164182
#
165183

166184
# List all user C define here, like -D_DEBUG=1
167-
UDEFS = -DWOLFSSL_USER_SETTINGS -DLWIP_DEBUG
168-
185+
#UDEFS = -DWOLFSSL_USER_SETTINGS -DLWIP_DEBUG
186+
UDEFS = -DSHELL_CMD_TEST_ENABLED=0 -DWOLFSSL_USER_SETTINGS -DLWIP_DEBUG \
187+
-DDEBUG_TRACE_PRINT=1 -DCHPRINTF_USE_FLOAT=1 -DPORT_ENABLE_GUARD_PAGES=1 \
188+
-DINCLUDE_SEGGER_JLINK=$(INCLUDE_SEGGER_JLINK_VALUE) -Dboot_t=bool -DSERIAL_BUFFERS_SIZE=512 \
189+
-DUSE_AE_SHELL=$(USE_AE_SHELL_VALUE) -DSIZEOF_INT=4
169190
# Define ASM defines here
170191
UADEFS =
171192

source/AudioDriver/audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void AUDIO_IO_Init(void){
131131
palSetLineMode(AUDIO_I2S_MCK_LINE, AUDIO_I2S_PIN_MODE);
132132

133133
#else
134-
// /* I2CD_CODEC-->CODEC SCL and SDA pins configuration -------------------------------------*/
134+
// /* I2CD_CODEC-->CODEC SCL and SDA pins configuration. NOte that no need for pull-up reisters. see schematic for details-------------------------------------*/
135135
palSetLineMode(AUDIO_I2C_SCL_LINE, PAL_MODE_ALTERNATE(SAI_I2C_SCL_AF) | AUDIO_I2C_LINE_MODE);
136136
palSetLineMode(AUDIO_I2C_SDA_LINE, PAL_MODE_ALTERNATE(SAI_I2C_SDA_AF) | AUDIO_I2C_LINE_MODE);
137137
/* CODE SAI pins configuration: WS, SCK and SD pins ... See Schematic Page 41 & 42 STM32F769i User Manual.-----------------------------*/

0 commit comments

Comments
 (0)