Hi Chris,

Way back the MC6805 was listed as having the most market share.  I'm not sure 
whether the STM32 has the most or if it's really just the ARM architecture.  
Numbers like that always get thrown around to appeal to the "Join the Popular 
Crowd Group".  When I start a new project, like back in 2008 when asked to 
build the Olympic Rings I looked around for what would work for me.  Not what 
was popular.  Once we decided 5 CAN channels were a requirement the number of 
processor families dropped to 1.

I never have and probably never will build 10,000 or more of anything.  Even 
1,000 is a large number for my clients.  So the cost or popularity of the 
processor rarely impacts the total price of what I design.   Even just ARM 
compatible in most cases isn't a big deal since again 99% of the work is in a 
high level language and as long as it fits in the FLASH memory there tends to 
be a who cares attitude from the client.

Another criteria is development environments and support.   Now here costs do 
factor.  Every hour spend on the development adds over $100 to cost of the R&D 
and if you only build 100 units then the price goes up by $1 for each hour 
wasted.

I upgraded the System Workbench for STM32 on my WIN-7 system and tried for over 
an hour to create a simple Hello World Project.  It's been years since I 
touched the ST family.  Just haven't had a project that needs a 32 bit 
processor and if I do there are the various 32 bit ARM variants that can be 
programmed by the Arduino IDE.  Adafruit has some nice stuff for that.  I have 
all sorts of RGB projects on the go.  Too many.

Anyway, after more than an hour with the AC6 Tools Eclipse Based ID for the 
STM32 the final results are as follows:
This was created by the IDE as the sample Hello World program.  I just chose 
the processor and the target module for it.
/*
 ============================================================================
 Name        : HelloWorld.c
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>

int main(void) {
        puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
        return EXIT_SUCCESS;
}

After compiling  here's the output which shows it failed because it couldn't 
find any of the library files.  Part of my hour trying to solve this problem 
was to even search the web for similar issues.  There were.  Most often the 
replies on the forums were the fairly usual and obvious "it can't find a 
function" with no guidance on how to go about finding them.  Or how to set the 
tool chain correctly.  

Cost.  1 hour.   See below this listing for the next experiment.

15:49:08 **** Incremental Build of configuration Release for project Hello1 ****
make -j8 all 
Building target: Hello1.elf
Invoking: MCU GCC Linker
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 
-T"C:/Users/john/workspace/HelloWorld/Hello1/LinkerScript.ld" 
-Wl,-Map=output.map -Wl,--gc-sections -o "Hello1.elf" @"objects.list"   -lm
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc.a(lib_a-writer.o):
 In function `_write_r':
writer.c:(.text._write_r+0x12): undefined reference to `_write'
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc.a(lib_a-closer.o):
 In function `_close_r':
closer.c:(.text._close_r+0xc): undefined reference to `_close'
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc.a(lib_a-lseekr.o):
 In function `_lseek_r':
lseekr.c:(.text._lseek_r+0x12): undefined reference to `_lseek'
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc.a(lib_a-readr.o):
 In function `_read_r':
readr.c:(.text._read_r+0x12): undefined reference to `_read'
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc.a(lib_a-fstatr.o):
 In function `_fstat_r':
fstatr.c:(.text._fstat_r+0x10): undefined reference to `_fstat'
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libc.a(lib_a-isattyr.o):
 In function `_isatty_r':
isattyr.c:(.text._isatty_r+0xc): undefined reference to `_isatty'
collect2.exe: error: ld returned 1 exit status
make: *** [Hello1.elf] Error 1
makefile:34: recipe for target 'Hello1.elf' failed

15:49:11 Build Finished (took 2s.946ms)

*****************************************************************************************

OK.  So a PIC32MX512 will also work as a hardware platform.  Up till now I 
still prefer MPLAB-8 but to be fair I've used the latest Microchip MPLABX.
Create a project named HelloWorld.
New C File that is HelowWorldMain.c
IDE creates this for me and I added in the printf(Hello World\n");  BTW, I've 
also chosen the ICD-3 in circuit debugger as my debug/program tool.

/* 
 * File:   HelloWorldMain.c
 * Author: john
 *
 * Created on March 10, 2019, 3:32 PM
 */

#include <stdio.h>
#include <stdlib.h>

/*
 * 
 */
int main(int argc, char** argv) {
    printf("Hello World\n");
    return (EXIT_SUCCESS);
}

So far not that different right?

Next click on Project and Build and here's the output.

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/john/MPLABXProjects/HelloWorld.X'
make  -f nbproject/Makefile-default.mk 
dist/default/production/HelloWorld.X.production.hex
make[2]: Entering directory 'C:/Users/john/MPLABXProjects/HelloWorld.X'
"C:\Microchip\MPLAB C32 Suite\bin\pic32-gcc.exe" -g -x c -c 
-mprocessor=32MX795F512L -MMD -MF build/default/production/HelloWorldMain.o.d 
-o build/default/production/HelloWorldMain.o HelloWorldMain.c 
"C:\Microchip\MPLAB C32 Suite\bin\pic32-gcc.exe"   -mprocessor=32MX795F512L  -o 
dist/default/production/HelloWorld.X.production.elf 
build/default/production/HelloWorldMain.o       
-Wl,--defsym=__MPLAB_BUILD=1,-Map="dist/default/production/HelloWorld.X.production.map"
"C:\Microchip\MPLAB C32 Suite\bin"\\pic32-bin2hex 
dist/default/production/HelloWorld.X.production.elf  
make[2]: Leaving directory 'C:/Users/john/MPLABXProjects/HelloWorld.X'
make[1]: Leaving directory 'C:/Users/john/MPLABXProjects/HelloWorld.X'

BUILD SUCCESSFUL (total time: 4s)
Loading code from 
C:/Users/john/MPLABXProjects/HelloWorld.X/dist/default/production/HelloWorld.X.production.hex...
Loading completed


No errors.  

Really no reason to continue with STM32 development when the PIC32 MPLABX is 
that easy.

John

> -----Original Message-----
> From: Chris Albertson [mailto:albertson.ch...@gmail.com]
> Sent: March-10-19 2:40 PM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] STM32 Blue Pill
> 
> Yes the PRU is unique.   This is both good and bad.  Bad because using
> it locks you to Texas Instruments "forever" Good because the PRU
> bandwidth is very good because of the shared memory.
> 
> As for debugging.  The STM32 has that, hardware breakpoint and all.
> 
> The STM32 now has about 2/3 of the market which means that 33% of the
> time some other solution worked better.
> 
> One good thing about thePi/STM32hybris of the TI's integrated PRUs is
> that if your requirements grow you are "stuck" if your software it
> tried to the Beagle Board.   With Pi3/STM32 there is a LOT of room to
> grow. The Pi3canbe replaced with a Xeon-based server class machine and
> the STMline goes all the way to the M7.     Also there as only two
> PRUs, if your project needs more pins you are again"stuck" but you can
> always add more STM32 and connect them all with I2C.
> 
> I like the BBB.  I own two of them.  But only for a project that is
> never going to get big.
> 
> On Sat, Mar 9, 2019 at 1:52 PM John Dammeyer <jo...@autoartisans.com>
> wrote:
> >
> > Hey Chris,
> >
> > AFAIK, the Pi has better HDMI support compared to the Beagle but then it
> was designed more for multimedia.  The Beagle PRUs have the advantage
> that they have access to some of the Beagle Processor RAM.  That gives
> them a bit of an advantage over the PI/32 bit hybrid using SPI.
> > >
> > > Somepeople are using BeagalBone Black boards because the BBB has
> those
> > > PRUs.   This is like the Pi/STM32 hybrid, logically identical.
> > >
> >
> > I did a project last year where I used a PIC32 as a Vehicle CAN bus monitor
> collecting CAN packets, timestamping and logging GPS information during
> the 20 seconds or so it took the Pi3 to boot.   Once the PI was alive, an app
> written initially in Python but then changed to C for speed, would gather
> and file the messages chronologically for later forwarding up to a cloud
> database. Someone else wrote that software.   Our connection between the
> two applications the files and pipes.
> >
> > In developing that project I chose the PIC32 over an STM32 because price
> of the processor wasn't a consideration but having an ICD-3 In Circuit
> Debugging tool was invaluable.  I used the free PIC32 compiler and MPLAB
> IDE.  Development board that could hold MIKROE Click modules
> > https://www.mikroe.com/click
> > The CLICK boards made changing our minds really easy.
> >
> >
> > What's available for the STM32 that is equivalent to the In Circuit
> Debuggers from Microchip?
> >
> > John Dammeyer
> > http://www.autoartisans.com
> >
> > >
> > > Chris Albertson
> > > Redondo Beach, California
> > >
> > > _______________________________________________
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
> >
> >
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> --
> 
> Chris Albertson
> Redondo Beach, California
> 
> 
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to