Discussion:
[Freetel-codec2] Necessary files
Steve
2016-09-07 11:02:24 UTC
Permalink
No problem Eric,

Also, just to be complete, as you probably already know, but after the .elf
file is built, there is a rule to convert it to a .bin file before upload
to the device.

# Rule for building .bin files from a .elf
%.bin: %.elf
$(OBJCOPY) -O binary $< $@

which translates to:

arm-none-eabi-objcopy -O binary sm1000.elf sm1000.bin

73
Steve
2016-09-07 08:58:27 UTC
Permalink
For example, the rule is:

sm1000.elf: $(SM1000_SRCS:.c=.O3.o) src/stm32f4_dac.O3.o \
src/stm32f4_adc.O3.o libstm32f4.a
$(CC) $(CFLAGS) -O3 $^ -o $@ $(LIBPATHS) $(LIBS)

Which says it needs SM1000_SRCS, src/stm32f4_dac.O3.o,
src/stm32f4_adc.O3.o, libstm32f4.a

Working backwards, we find, just above this rule, the dac and adc build
rules which are single files, and then above those you see SM1000_SRCS is
made up of a list of file + CODEC2_SRCS

SM1000_SRCS=\
src/sm1000_main.c \
src/tone.c \
src/sfx.c \
src/sounds.c \
src/morse.c \
src/menu.c \
src/tot.c \
src/sm1000_leds_switches.c \
../src/fifo.c \
src/debugblinky.c \
src/system_stm32f4xx.c \
src/startup_stm32f4xx.s \
src/stm32f4_vrom.c \
src/init.c

Way up you'll find CODEC2_SRCS

CODEC2_SRCS=\
$(CODEC2_SRC)/lpc.c \
$(CODEC2_SRC)/nlp.c \
$(CODEC2_SRC)/postfilter.c \
$(CODEC2_SRC)/sine.c \
$(CODEC2_SRC)/codec2.c \
$(CODEC2_SRC)/kiss_fft.c \
$(CODEC2_SRC)/kiss_fftr.c \
$(CODEC2_SRC)/interp.c \
$(CODEC2_SRC)/lsp.c \
$(CODEC2_SRC)/phase.c \
$(CODEC2_SRC)/quantise.c \
$(CODEC2_SRC)/pack.c \
$(CODEC2_SRC)/codebook.c \
$(CODEC2_SRC)/codebookd.c \
$(CODEC2_SRC)/codebookjvm.c \
$(CODEC2_SRC)/codebookge.c \
$(CODEC2_SRC)/dump.c \
$(CODEC2_SRC)/fdmdv.c \
$(CODEC2_SRC)/freedv_api.c \
$(CODEC2_SRC)/varicode.c \
$(CODEC2_SRC)/golay23.c \
$(CODEC2_SRC)/fsk.c \
$(CODEC2_SRC)/fmfsk.c \
$(CODEC2_SRC)/freedv_vhf_framing.c \
$(CODEC2_SRC)/freedv_data_channel.c

I use an IDE myself, but had to use Makefiles back in the PDP-11 days :-)
Thanks for that Steve,
That should help heaps.
I'm not up to speed with make files because I usually work in and IDE
which take care of this.
By being able to just place the files I need in a suitable folder I will
be able to much eaiser import this code into an IDE where I can begin to
work on it.
Dave had pointed to the make file but wasn't sure of the specific rule.
Again thank you for your help Steve.
Cheers
Eric
The necessary files are in the stm32/Makefile
Look at the rule for sm1000.elf and work backwards. Were it I, I would
copy the Makefile and edit out the builds you don't need.
------------------------------------------------------------------------------
_______________________________________________
------------------------------------------------------------
------------------
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2
Steve
2016-09-07 09:42:47 UTC
Permalink
I notice there is "feature creep" in there. I usually strip out this stuff
and then work through all the resulting errors to find where they are
intertwined in the other .h and .c files. But the following files are
unusable fluff right now to your specific HF radio task:

$(CODEC2_SRC)/kiss_fftr.c
$(CODEC2_SRC)/fsk.c
$(CODEC2_SRC)/fmfsk.c
$(CODEC2_SRC)/freedv_vhf_framing.c
$(CODEC2_SRC)/freedv_data_channel.c

...although it won't hurt to leave them in. It will keep the flash warm.

FYI

Also, I didn't mention the .a (archive file), but I assume you know that is
the library that is built from all the ARM code that was burst from the STM
ZIP file. Once you build the .a file, set it aside and you don't ever have
to build it again.

73
e***@vk5kbb.com
2016-09-07 10:34:21 UTC
Permalink
Thanks Steve,

You have helped me out heaps.
Better idea of what I need now.

Cheers

Eric.
Post by Steve
$(CODEC2_SRC)/kiss_fftr.c
$(CODEC2_SRC)/fsk.c
$(CODEC2_SRC)/fmfsk.c
$(CODEC2_SRC)/freedv_vhf_framing.c
$(CODEC2_SRC)/freedv_data_channel.c
...although it won't hurt to leave them in. It will keep the flash warm.
FYI
Also, I didn't mention the .a (archive file), but I assume you know that is the library that is built from all the ARM code that was burst from the STM ZIP file. Once you build the .a file, set it aside and you don't ever have to build it again.
73
------------------------------------------------------------------------------
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2 [1]
Links:
------
[1] https://lists.sourceforge.net/lists/listinfo/freetel-codec2
glen english
2016-09-07 09:00:06 UTC
Permalink
Hi Eric
I retract my last comment about you being "inexperienced or poorly
skilled or both in the art."

I apologize it was uncalled for.

However.

Do consider the company you keep here. Go and read the bio on some of
these guys like Bruce.

regards
Thanks for that Steve,
That should help heaps.
------------------------------------------------------------------------------
e***@vk5kbb.com
2016-09-07 09:45:21 UTC
Permalink
Thank you Glenn and I apologize to all if I offended any one and should
have kept my response to personal email.

I am just trying to get up to speed as quickly as possible and I
appreciate all the help people are giving me.

I am sorry if questions have been asked before.

Regards

Eric
Post by glen english
Hi Eric
I retract my last comment about you being "inexperienced or poorly
skilled or both in the art."
I apologize it was uncalled for.
However.
Do consider the company you keep here. Go and read the bio on some of
these guys like Bruce.
regards
Thanks for that Steve, That should help heaps.
------------------------------------------------------------------------------
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2 [1]
Links:
------
[1] https://lists.sourceforge.net/lists/listinfo/freetel-codec2
e***@vk5kbb.com
2016-09-13 07:59:00 UTC
Permalink
I wasnt thinking of it as a straight Unix implementation.

I assumed the .a was an assembler file not an archive.

Doesnt help me and creates more headaches but at least Iknwo what it is
doing now.

Cheers

Eric
e***@vk5kbb.com
2016-09-13 08:51:07 UTC
Permalink
Sorry was not supposed to go to the list .

Apologies.
Post by e***@vk5kbb.com
I wasnt thinking of it as a straight Unix implementation.
I assumed the .a was an assembler file not an archive.
Doesnt help me and creates more headaches but at least Iknwo what it is doing now.
Cheers
Eric
------------------------------------------------------------------------------
_______________________________________________
Freetel-codec2 mailing list
https://lists.sourceforge.net/lists/listinfo/freetel-codec2 [1]
Links:
------
[1] https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Continue reading on narkive:
Loading...