>>>>> John Devereux <
jo...@devereux.me.uk> writes:
>>>>> Ivan Shmakov <
onei...@gmail.com> writes:
[...]
>> The question at hand: what'd be the minimum wiring for ST32F103C8T6?
>> I guess that one has to connect the power, the crystal, NRST, BOOT0,
>> BOOT1, and most likely TxD and RxD of one of the UARTs. Is there
>> anything else I should consider (besides of the "payload" itself)?
> I think that's it. For some applications you don't need the crystal,
> but for USB you will want it.
ACK, thanks. I have now soldered the MCU to a prototyping board
(thus "turning" the LQFP-48 case at hand into a makeshift DIP-48
one, suitable for breadboarding, etc.)
Following [1] as an example, I've wired all the Vdd-{1,2,3} pins
together, as well as Vss-{1,2,3,A}, and also built an NRST
circuit as depicted there. I've also connected BOOT0 (pin 44)
and BOOT1 (pin 20), via 10 k resistors, to the Power and Ground
rails, respectively. (I've omitted a crystal for now.)
[1]
http://yourportablelab.com/downloads/schematics/STM32F103RBT6mini.pdf
Applying 3.3 V power, however, I find that nearly all the
digital I/O pins are tri-stated, /including/ USART1's TxD,
which, I assume, should've been configured as output by the
bootloader. (Similarly, I'd assume that BOOT1 (pin 20) would've
been configured for input, but it doesn't seem to be the case,
either.) Any ideas on what I might have got wrong?
(Naturally, I've checked for extra or missing connections a few
times, and believe I've fixed them all before applying power.)
The JTAG's JTMS/SWDIO (34) and JNTRST (40) pins seem to be
pulled up, however, and JTDI (38) seem to be set up as output.
(Do I understand it correctly that the JTAG pin names are
relative to the adapter's side, not MCU's side, BTW?)
[...]
>> Do I understand it correctly that a GCC cross-compiler, along with
>> the usual GNU Binutils, etc., will be a fit? (FWIW, I'm quite
>> familiar with the GNU toolchain per se.) Is there any free software
>> C library to consider?
> Most of the gcc distributions come with newlib. You can in fact
> build gcc to run without it (and then you are missing the standard C
> library functions, but in my experience you can write the few you use
> yourself and get a much smaller executable).
> There is now a distribution directly supported by ARM:
> <
https://launchpad.net/gcc-arm-embedded>
> This has a modified newlib that e. g. allows printf to be tuned for
> size.
ACK, thanks.
I have now built Binutils 2.23.2, GCC 4.8.0, Newlib 2.0.0; as
well as libopencm3 (as of af985213), which seems to be a crucial
part when it comes to the access to peripherals.
I was able to compile a simplistic example (mostly following
[2], yet adding a few calls from [3]), but due to the above I'm
yet to see if it actually works.
[2]
http://www.triplespark.net/elec/pdev/arm/stm32.html
[3]
http://libopencm3.github.io/docs/latest/stm32f1/html/group__gpio__file.htm
[...]
>> As per the datasheet, it seems to be possible to program the MCU
>> over UART via the built-in bootloader. What software do I use to
>> interact with the latter on the host side? So far, I've found only
>> [1] (and yet to check if it actually works.)
> You could consider using SWD instead of, or as well as, the
> bootloader for debug access. In which case you would have a JTAG
> connector.
Indeed, I've already ordered a JTAG adapter (dubbed J-Link v9;
I don't know much more about it, just that it cost me some
10 USD or so), but the parcel seem to have been stuck at the
country's border since 11th of April.
So, unless there's an easy way "DIY" one myself, I'd probably
have to wait for some more time.
> I use openocd which plays well with gdb (the debugger from the GNU
> toolchain). The STM32 parts are very well supported in openocd.
ACK, thanks!
[...]
--
FSF associate member #7257 np. Mi memoras -- Kajto