7 years, 8 months ago.

What changes were made to the compiler on Friday?

Yesterday afternoon (New Zealand) something seemed to suddenly change on the mbed compiler, so that my programmes no longer load. Ideas on what would be appreciated. Situation is that I had previously been using the on-line compiler to successfully generate binary files for an NZ32-SC151 (from Modtronix) even though this board isn't yet directly supported by mbed (Modtronix are working on this).

Although it isn't yet formally supported its TARGET/CMIS and TARGET/HAL directories are present in mbed-dev. So I simply renamed those directories to be the same as for a NUCLEO-L152RE, which is a very similar processor to the L151RC on the target board (but with more flash and ram). A change was also needed to one hal file to do with gpio masking. Then with my target set as a NUCLEO-L152RE I was able to use mbed very successfully with my target board, including for relatively large, complex programmes. Using this for more than a week.

However, yesterday (Friday pm, New Zealand), the compiler suddenly started behaving oddly, intermittently throwing errors. When it did compile the flash and RAM figures indicators weren't indicating anything, even though an apparently correct file size was being generated.

This morning (Saturday) part of this problem seemed to have gone away, with indicators ok, but NZ32-SC151 binaries no longer download properly to the target (using a Nucleo programmer) and won't run. However there is no problem loading and running on an actual NUCLEO-L152RE. The NZ32-SC151 hardware seems ok as I have been able to load and run programmes generated via an off-line compiler (using the Nucleo programmer). Be grateful if anybody has a clue as to what might have changed and/or ideas of how to fix! Best wishes from down under, Ron.

1 Answer

-deleted-
7 years, 8 months ago.

Hi Ron,

The changes to the mbed Compiler are related to compile and include order, e.g. both includes and source files are sorted alphabetically.

Would you be able to describe the compile problems you experienced? Do you think you could provide instructions to reproduce the problem?

Cheers,
Mihail

Hi Mihail, thanks for getting back.

Here is what I'm doing to compile a programme for the NZ32-SC151, which had been working well up to Friday.

1. Set target as NUCLEO-L152RE

2. Delete binary mbed and import latest mbed-dev source.

3. Rename (or delete) folders mbed-dev/targets/hal/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE and mbed-dev/targets/cmsis/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE

4. Rename mbed-dev/targets/hal/TARGET_STM/TARGET_STM32L1/TARGET_NZ32_SC151 folder to mbed-dev/targets/hal/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE

5. Rename mbed-dev/targets/cmsis/TARGET_STM/TARGET_STM32L1/TARGET_NZ32_SC151 folder to mbed-dev/targets/cmsis/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE

6. Modify mbed-dev/targets/hal/TARGET_STM/TARGET_STM32L1/gpio_object.h so that line 58 compiles i.e. *obj->reg_set = obj->mask << 16; which is necessary for the L151RC processor

That's it. Subsequently a programme was compiling ok, flashing to the NZ32-SC151 board and running ok. I had carried out the above procedure to compile and run several programmes for this target until Friday.

On Friday, suddenly, on compiling I was getting L6218e type errors (think it was!). Reloaded the screen and these went away, although not always. Also the memory usage area was showing zero flash/ram having been used, though the .bin file was about right size. On Saturday morning these symptoms had gone, with an apparentl normal compile.

However, downloading to the virtual disk of a Nucleo ST-LinkV2-1 programmer (tried more than one) the indicator light flashes green for a shorter time than it had been when the programme was loading and running properly, or doesn't change from red at all, depending on the size of the compiled programme. The programme then doesn't run on the target, i.e. no output of any kind (leds or pc.printf). It must be partially loading as it seems to overwrite or partially overwrite any off-line programme that has been flashed to the board.

The same applies using DFU USB bootloading to flash the NZ32-SC151 target. Again this fails for .bin files from on-line mbed compilations but succeeds with .bins from off-line compiles, e.g. using OpenSTM32 AC6.

Any ideas on what to try to fix this would be very much appreciated. Best wishes, Ron.

posted by Ron Segal 30 Jul 2016