Code Monkey home page Code Monkey logo

platform-freescalekinetis's Introduction

PlatformIO Core

CI Build for PlatformIO Core CI Build for Docs CI Build for dev-platform examples CI Build for the Community Projects Latest Version PlatformIO Labs

Quick Links: Homepage | PlatformIO IDE | Registry | Project Examples | Docs | Donate | Contact Us

Social: LinkedIn | Twitter | Facebook | Community Forums

https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-ide-laptop.png

PlatformIO: Your Gateway to Embedded Software Development Excellence.

Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success.

  • Open source, maximum permissive Apache 2.0 license
  • Cross-platform IDE and Unified Debugger
  • Static Code Analyzer and Remote Unit Testing
  • Multi-platform and Multi-architecture Build System
  • Firmware File Explorer and Memory Inspection

Get Started

Solutions

Advanced

Registry

Contributing

See contributing guidelines.

Telemetry / Privacy Policy

Share minimal diagnostics and usage information to help us make PlatformIO better. It is enabled by default. For more information see:

License

Copyright (c) 2014-present PlatformIO <[email protected]>

The PlatformIO is licensed under the permissive Apache 2.0 license, so you can use it in both commercial and personal projects with confidence.

SWUbanner

platform-freescalekinetis's People

Contributors

ivankravets avatar valeros avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

platform-freescalekinetis's Issues

Failed to compile mbed-blink with frdm_kl26z

mbed-blink example

platformio.ini

[env:frdm_kl26z]
platform = freescalekinetis
board = frdm_kl26z
framework = mbed

build_flags = -v
pio run

Result

[Tue May  2 22:30:09 2017] Processing frdm_kl26z (platform: freescalekinetis, build_flags: -v, board: frdm_kl26z, framework: mbed)
-----------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Collected 8 compatible libraries
Looking for dependencies...
Project does not have dependencies
Linking .pioenvs/frdm_kl26z/firmware.elf
.pioenvs/frdm_kl26z/FrameworkMbed-TOOLCHAIN_GCC_ARM-652f6/startup_MKL26Z4.o: In function `Reset_Handler':
(.text+0x6): undefined reference to `init_data_bss'
collect2: error: ld returned 1 exit status
*** [.pioenvs/frdm_kl26z/firmware.elf] Error 1

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

** [upload] /dev/ttyACM0/firmware.bin: Not a directory

Hi all.
I'm trying to run an example on a Freescale board. Building is OK but I can't upload file to the board.
Here is my upload command and its output:

pio run --target upload --upload-port /dev/ttyACM0 -v
[Thu Aug 17 20:47:00 2017] Processing frdm_kl46z (platform: freescalekinetis; upload_port: /dev/ttyACM0; board: frdm_kl46z; framework: mbed)
---------------------------------------------------------------------------------------------------------
Collected 22 compatible libraries
Looking for dependencies...
Project does not have dependencies
MethodWrapper(["upload"], [".pioenvs/frdm_kl46z/firmware.bin"])
Use manually specified: /dev/ttyACM0
MethodWrapper(["upload"], [".pioenvs/frdm_kl46z/firmware.bin"])
*** [upload] /dev/ttyACM0/firmware.bin: Not a directory
======================================= [ERROR] Took 1.32 seconds =======================================

I searched a lot on Google but there's no information can help me. So I create an issue here.
Thank you!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Printk to console fails for freescale kinetis 8.2.0 (Zephyr 2.6.0) on FRDM-K64F

Problem Description
Printk outputs are not sent to the console using Freescale Kinetis 8.2.0, Zephyr 2.6.0, PlatformIO Core 5.20 (Home 3.3.4). Platform is FRDM-K64F.

To Reproduce

  1. Install most recent PlatformIO v.2.3.3 in VS Studio Code (Core 5.2.0, Home 3.3.4).
  2. Install Platfrom "Freescale Kinetis", ver. 8.2.0
  3. Try a blinky App and additionally add one line of code at the beginning of main:
    printk("hello world! %s\n", CONFIG_BOARD);
  4. prj.conf looks like
    CONFIG_GPIO=y
    CONFIG_SERIAL=y
  5. build and upload to FRDM-K64F

Expected behavior
Green LED should start blinking, "hello world! ..." should be seen in console .
Received behavior
The green LED is blinking only if CONFIG_SERIAL=n. LED is not blinking if CONFIG_SERIAL=y, printk statements are sent to console in no case.

Workaround
Using the FRDM-K64F controller with the same simple application (blinky + "HelloWorld") is working with Freescale Kinetis 8.1.0, Zephyr 2.5.0. LED is blinking properly, printk statements are sent to the console.

Impact
Without logging statements to the console application development is more complicated.

console output
No output.

Environment

  • OS: Windows 10
  • PlatformIO v.2.3.3 (Core 5.2.0), Zephyr 2.6.0, Freescale Kinetis 8.2.0
  • FRDM-K64F

NOTE
Problem printk to console fails for freescale kinetis 8.2.0 (Zephyr 2.6.0) on FRDM-K64F · Issue #38631 · zephyrproject-rtos/zephyr (github.com)
was closed with the note to file this problem in this community.
Problem also described in https://community.platformio.org/t/printk-to-console-fails-for-freescale-kinetis-8-2-0-zephyr-2-6-0-on-frdm-k64f/23732

NOTE2
Problem seems to be fixed with closed problems #38631 via #39452 in Zephyr. Problem was an order issue.

Failed to compile project with BLE api( x-nucleo-idb0xa1)

Description of problem

When I tried to build example project https://developer.mbed.org/teams/ST/code/BLE_HeartRate_IDB0XA1/ compilation failed.

Compilation fails on core file cmsis_nvic with pragma error:
#error The target should define yotta config cmsis-nvic.has-vtor, or cmsis-nvic.has-custom-vtor + implement NVIC_SetVector/NVIC_GetVector_
and fiew warnings that I should use c++11 standard.
After adding building flag -std=c++11 compilation ends with another error:

/home/martin/.platformio/packages/framework-mbed/drivers/RawSerial.cpp:63:66: error: 'vsnprintf' was not declared in this scope
int len = vsnprintf(dummy_buf, sizeof(dummy_buf), format, arg);

Configuration

Tested on:
platformio --version:
develop version: PlatformIO, version 3.3.0a11
stable version: PlatformIO, version 3.2.1
Platform versions:

freescalekinetis @ 1.6.0    
framework-mbed @ 3.131.0
toolchain-gccarmnoneeabi @ 1.40804.0

platformio.ini file:

[env:frdm_kl25z]
platform = freescalekinetis
framework = mbed
board = frdm_kl25z
build_flags = -std=c++11
lib_deps =
   x-nucleo-idb0xa1

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Problem with the built-in uploading button and compiler problem with delay

i can't upload (and compile ) something with a delay smaller than 100ms because then the board doesn't work anymore, it continues as an external USB drive, but it doesn't execute any new bin file

it's kind of weird because if i only compile the file, and then manually upload the bin file it works everytime, i can put it 20 time and it still works, but if i upload it with the built in button more than one time it bricks again, it doesn´t execute any code


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Framework mbed in FRDM_KL82Z

When I try to compile a project for the frdm_kl82z board, the mbed framework fails at compilation:

[env:frdm_kl82z]
platform = freescalekinetis
board = frdm_kl82z
framework = mbed

I hit compile in VSC IDE and obtains:

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/freescalekinetis/frdm_kl82z.html
PLATFORM: Freescale Kinetis 5.0.1 > Freescale Kinetis FRDM-KL82Z
HARDWARE: MKL82Z128VLK7 96MHz, 96KB RAM, 128KB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
 - framework-mbed 6.51401.200113 (5.14.1)
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
Collecting mbed sources...
mbed build API internal error
write() takes 2 positional arguments but 3 were given

FRDM-K20D50M: Upload doesn't work, but Pio debug works

Hello
I have trouble with upload. Debug work fine, but when I upload, platformio tell me is ok, but firmware doesn't launch after jlink reset the board.

 Downloading file [.pio/build/frdm_k20d50m/firmware.bin]...
Comparing flash   [100%] Done.
Erasing flash     [100%] Done.
Programming flash [100%] Done.
Verifying flash   [100%] Done.
J-Link: Flash download: Bank 0 @ 0x00000000: 2 ranges affected (32768 bytes)
J-Link: Flash download: Total time needed: 1.165s (Prepare: 0.041s, Compare: 0.034s, Erase: 0.221s, Program: 0.857s, Verify: 0.003s, Restore: 0.006s)
O.K.

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
AfterResetTarget()


Script processing completed.

====== [SUCCESS] Took 23.15 seconds ======================

Terminal will be reused by tasks, press any key to close it.

here is my platformio.ini

;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:frdm_k20d50m]
platform = freescalekinetis
board = frdm_k20d50m
framework = mbed
debug_tool = jlink
; SWD interface

upload_protocol = jlink

; JTAG interface
;upload_protocol = cmsis-dap

with kinetis studio, no trouble.

Thanks a lot

Home: Could not initialize project FRDM-K82F

PIO Core Call Error: "The next files/directories have been created in /home/ahmed/Documents/PlatformIO/Projects/blinky\ninclude - Put project header files here\nlib - Put here project specific (private) libraries\nsrc - Put project source files here\nplatformio.ini - Project Configuration File\n\nError: Processing frdm_k82f (platform: freescalekinetis; board: frdm_k82f; framework: mbed)\n--------------------------------------------------------------------------------\nPackageManager: Installing framework-mbed @ ~5.51001.1\nDownloading\nDownloading\nUnpacking\nUnpacking\nVerbose mode can be enabled via -v, --verbose option\nCONFIGURATION: https://docs.platformio.org/page/boards/freescalekinetis/frdm_k82f.html\nPLATFORM: Freescale Kinetis > Freescale Kinetis FRDM-K82F\nHARDWARE: MK82FN256VLL15 150MHz 256KB RAM (256KB Flash)\nDEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(jlink)\nCannot find the configuration file for your board! Please read instructions here /home/ahmed/.platformio/packages/framework-mbed/platformio/README.txt\n========================= [ERROR] Took 450.53 seconds ========================="

Fail to compile FRDM-KL25 Example, the ide is uptodate

[07/20/17 11:31:05] Processing frdm_kl25z (platform: freescalekinetis; board: frdm_kl25z; framework: mbed)

Verbose mode can be enabled via -v, --verbose option
Collected 42 compatible libraries
Looking for dependencies...
Library Dependency Graph
|-- v1.5.0

| |-- v1.3.0
| |-- v1.3.0
| | |-- v1.1.0
| | |-- v1.8.0
| | | |-- v1.2.0
| |-- v1.1.0
| |-- v1.8.0
| | |-- v1.2.0
| |-- v1.3.0
| | |-- v1.3.0
| | |-- v1.1.0
| | |-- v1.8.0
| | | |-- v1.2.0
| |-- v1.3.0
| |-- v1.2.0
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\AnalogIn.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\BusIn.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\BusInOut.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\BusOut.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\CAN.o

Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\Ethernet.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\FlashIAP.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\I2C.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\I2CSlave.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\InterruptIn.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\InterruptManager.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\RawSerial.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\SPI.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\SPISlave.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\Serial.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\SerialBase.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\Ticker.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\Timeout.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\Timer.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\TimerEvent.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\drivers\UARTSerial.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\hal\mbed_gpio.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\hal\mbed_lp_ticker_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\hal\mbed_pinmap_common.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\hal\mbed_ticker_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\hal\mbed_us_ticker_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\ATCmdParser.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\CallChain.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\FileBase.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\FileHandle.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\FilePath.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\FileSystemHandle.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\LocalFileSystem.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\Stream.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_alloc_wrappers.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_application.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_assert.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_board.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_critical.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_error.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_interface.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_mem_trace.o
C:\Users\ex.platformio\packages\framework-mbed\platform\mbed_critical.c: In function 'core_util_critical_section_exit':
C:\Users\ex.platformio\packages\framework-mbed\platform\mbed_critical.c:88:14: warning: unused variable 'interrupts_disabled' [-W
unused-variable]
bool interrupts_disabled = !core_util_are_interrupts_enabled(); /* get the current interrupt disabled state */
^~~~~~~~~~~~~~~~~~~
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_mktime.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_poll.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_retarget.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_rtc_time.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_sdk_boot.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_semihost_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_stats.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_wait_api_no_rtos.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\platform\mbed_wait_api_rtos.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\PeripheralPins.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device\TOOLCHAIN_GCC_ARM\startup
_MKL25Z4.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device\system_MKL25Z4.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\mbed_overrides.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\serial_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\spi_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\analogin_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\analogout_api.o
In file included from C:\Users\ex.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device/MKL
25Z4.h:121:0,
from C:\Users\ex.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device/cmsis.h:10,
from C:\Users\ex.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.c:17:
C:\Users\ex.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.c: In function 'gpi
o_irq_init':
C:\Users\ex.platformio\packages\framework-mbed\cmsis/core_cm0plus.h:733:67: warning: 'irq_n' may be used uninitialized in this fu
nction [-Wmaybe-uninitialized]
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL));

C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.c:86:15: note: 'irq
_n' was declared here
IRQn_Type irq_n;
^~~~~
In file included from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device/MKL
25Z4.h:121:0,
from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device/cmsis.h:10,
from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.c:17:
C:\Users\ex\.platformio\packages\framework-mbed\cmsis/core_cm0plus.h:891:49: warning: 'vector' may be used uninitialized in this f
unction [-Wmaybe-uninitialized]
vectors[(int32_t)IRQn + NVIC_USER_IRQ_OFFSET] = vector;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.c:85:23: note: 'vec
tor' was declared here
uint32_t ch_base, vector;
^~~~~~
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\gpio_irq_api.c:103:23: warning: 
'ch_base' may be used uninitialized in this function [-Wmaybe-uninitialized]
obj->ch = ch_base + obj->pin;
~~~~~~~~^~~~~~~~~~
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\gpio_api.o
In file included from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\analogin_api.c:21:0:
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\clk_freqs.h:117:17: warning: 'mcgpllfll_frequ
ency' defined but not used [-Wunused-function]
static uint32_t mcgpllfll_frequency(void) {
^~~~~~~~~~~~~~~~~~~
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\clk_freqs.h:55:17: warning: 'extosc_frequency
' defined but not used [-Wunused-function]
static uint32_t extosc_frequency(void) {
^~~~~~~~~~~~~~~~
In file included from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\spi_api.c:
22:0:
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX/clk_freqs.h:117:17: warning: 'mcgpllfll_frequ
ency' defined but not used [-Wunused-function]
static uint32_t mcgpllfll_frequency(void) {
^~~~~~~~~~~~~~~~~~~
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX/clk_freqs.h:55:17: warning: 'extosc_frequency
' defined but not used [-Wunused-function]
static uint32_t extosc_frequency(void) {
^~~~~~~~~~~~~~~~
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\i2c_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\pinmap.o
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\serial_api.c: In function 'seria
l_format':
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\serial_api.c:190:19: warning: 'p
arity_select' may be used uninitialized in this function [-Wmaybe-uninitialized]
obj->uart->C1 = ((parity_enable << 1)
~~~~~~~~~~~~~~~~~~~~~
|  (parity_select << 0));
^~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\serial_api.c:189:37: warning: 'p
arity_enable' may be used uninitialized in this function [-Wmaybe-uninitialized]
obj->uart->C1 = ((parity_enable << 1)
~~~~~~~~~~~~~~~^~~~~
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\port_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\pwmout_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\rtc_api.o
Compiling .pioenvs\frdm_kl25z\FrameworkMbedCore\targets\TARGET_Freescale\TARGET_KLXX\sleep.o
In file included from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\i2c_api.c:21:0:
C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\clk_freqs.h:117:17: warning: 'mcgpllfll_frequ
ency' defined but not used [-Wunused-function]
static uint32_t mcgpllfll_frequency(void) {
^~~~~~~~~~~~~~~~~~~
Compiling .pioenvs\frdm_kl25z\lib\cmsis-core_ID1237\cmsis_nvic.o
Compiling .pioenvs\frdm_kl25z\lib\core-util_ID1236\ExtendablePoolAllocator.o
Compiling .pioenvs\frdm_kl25z\lib\core-util_ID1236\PoolAllocator.o
Compiling .pioenvs\frdm_kl25z\lib\core-util_ID1236\assert_mbed.o
Archiving .pioenvs\frdm_kl25z\lib\libmbed-hal_ID1004.a
Compiling .pioenvs\frdm_kl25z\lib\core-util_ID1236\assert_posix.o
In file included from C:\Users\ex\.platformio\lib\cmsis-core_ID1237\source\cmsis_nvic.c:31:0:
C:\Users\ex\.platformio\lib\cmsis-core_ID1237/cmsis-core/cmsis_nvic.h:37:0: warning: "NVIC_USER_IRQ_OFFSET" redefined
#define NVIC_USER_IRQ_OFFSET YOTTA_CFG_CMSIS_NVIC_USER_IRQ_OFFSET
In file included from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device/MKL
25Z4.h:121:0,
from C:\Users\ex\.platformio\packages\framework-mbed\targets\TARGET_Freescale\TARGET_KLXX\TARGET_KL25Z\device/cmsis.h:10,
from C:\Users\ex\.platformio\lib\cmsis-core_ID1237/cmsis-core/cmsis_nvic.h:35,
from C:\Users\ex\.platformio\lib\cmsis-core_ID1237\source\cmsis_nvic.c:31:
C:\Users\ex\.platformio\packages\framework-mbed\cmsis/core_cm0plus.h:713:0: note: this is the location of the previous definition
#define NVIC_USER_IRQ_OFFSET          16
C:\Users\ex\.platformio\lib\cmsis-core_ID1237\source\cmsis_nvic.c:65:2: error: #error The target should define yotta config cmsis-
nvic.has-vtor, or cmsis-nvic.has-custom-vtor + implement NVIC_SetVector/NVIC_GetVector
#error The target should define yotta config cmsis-nvic.has-vtor, or cmsis-nvic.has-custom-vtor + implement NVIC_SetVector/NVIC_GetVector
^~~~~
*** [.pioenvs\frdm_kl25z\lib\cmsis-core_ID1237\cmsis_nvic.o] Error 1
Indexing .pioenvs\frdm_kl25z\lib\libmbed-hal_ID1004.a
In file included from C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:22:0,
from C:\Users\ex\.platformio\lib\core-util_ID1236\source\ExtendablePoolAllocator.cpp:18:
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:49:43: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator(const PoolAllocator&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:50:32: error: expected ',' or '...' before '&&' token
PoolAllocator(PoolAllocator&&) = delete;
^~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:50:38: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator(PoolAllocator&&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:50:38: error: invalid constructor; you probably meant 'mbed
::util::PoolAllocator (const mbed::util::PoolAllocator&)'
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:51:55: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator& operator =(const PoolAllocator&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:52:44: error: expected ',' or '...' before '&&' token
PoolAllocator& operator =(PoolAllocator&&) = delete;
^~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:52:50: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator& operator =(PoolAllocator&&) = delete;
^~~~~~
In file included from C:\Users\ex\.platformio\lib\core-util_ID1236\source\ExtendablePoolAllocator.cpp:18:0:
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:45:63: warning: defaulted and deleted functions o
nly available with -std=c++11 or -std=gnu++11
ExtendablePoolAllocator(const ExtendablePoolAllocator&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:46:52: error: expected ',' or '...' before '&&' t
oken
ExtendablePoolAllocator(ExtendablePoolAllocator&&) = delete;
^~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:46:58: warning: defaulted and deleted functions o
nly available with -std=c++11 or -std=gnu++11
ExtendablePoolAllocator(ExtendablePoolAllocator&&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:46:58: error: invalid constructor; you probably m
eant 'mbed::util::ExtendablePoolAllocator (const mbed::util::ExtendablePoolAllocator&)'
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:47:75: warning: defaulted and deleted functions only available with -std=c++11 or -std=gnu++11
ExtendablePoolAllocator& operator =(const ExtendablePoolAllocator&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:48:64: error: expected ',' or '...' before '&&' t
oken
ExtendablePoolAllocator& operator =(ExtendablePoolAllocator&&) = delete;
^~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/ExtendablePoolAllocator.h:48:70: warning: defaulted and deleted functions o
nly available with -std=c++11 or -std=gnu++11
ExtendablePoolAllocator& operator =(ExtendablePoolAllocator&&) = delete;
^~~~~~
In file included from C:\Users\ex\.platformio\lib\core-util_ID1236\source\PoolAllocator.cpp:18:0:
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:49:43: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator(const PoolAllocator&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:50:32: error: expected ',' or '...' before '&&' token
PoolAllocator(PoolAllocator&&) = delete;
^~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:50:38: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator(PoolAllocator&&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:50:38: error: invalid constructor; you probably meant 'mbed
::util::PoolAllocator (const mbed::util::PoolAllocator&)'
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:51:55: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator& operator =(const PoolAllocator&) = delete;
^~~~~~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:52:44: error: expected ',' or '...' before '&&' token
PoolAllocator& operator =(PoolAllocator&&) = delete;
^~
C:\Users\ex\.platformio\lib\core-util_ID1236/core-util/PoolAllocator.h:52:50: warning: defaulted and deleted functions only availa
ble with -std=c++11 or -std=gnu++11
PoolAllocator& operator =(PoolAllocator&&) = delete;
^~~~~~
*** [.pioenvs\frdm_kl25z\lib\core-util_ID1236\ExtendablePoolAllocator.o] Error 1
*** [.pioenvs\frdm_kl25z\lib\core-util_ID1236\PoolAllocator.o] Error 1
 [ERROR] Took 22.22 seconds

Linker script issue with KL05

I've created a new empty project for the board frdm_kl05z.
I haven't changed the contents of any of the project files at all (including main.c).
On compiling i get this error:

Generating LD script .pio\build\frdm_kl05z\MKL05Z4.ld.link_script.ld Linking .pio\build\frdm_kl05z\firmware.elf c:/users/mark/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/7.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe:.pio\build\frdm_kl05z\MKL05Z4.ld.link_script.ld:80: syntax error collect2.exe: error: ld returned 1 exit status *** [.pio\build\frdm_kl05z\firmware.elf] Error 1

In the linker script, the error is in the heap section:
.heap : { __end__ = .; end = __end__; *(.heap*) .= ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE; __HeapLimit = .; } > RAM

On the ".= ORIGIN(RAM) + LENGTH(RAM) - STACK_SIZE;" line.

undefined reference to `__wrap_main' / undefined reference to `rtos::Thread::wait(unsigned long)'

Configuration

Operating system: mbed-os

PlatformIO Version (platformio --version): latest

Description of problem

Linking .pioenvs\frdm_k64f\firmware.elf
c:/users/fusedshadowx/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fp
v4-sp/softfp/crt0.o: In function _start': (.text+0x4a): undefined reference to __wrap_main'
.pioenvs/frdm_k64f/FrameworkMbedCore/platform/mbed_wait_api_rtos.o: In function wait_us': mbed_wait_api_rtos.cpp:(.text.wait_us+0x2a): undefined reference to rtos::Thread::wait(unsigned long)'
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\frdm_k64f\firmware.elf] Error 1

The above error shows on build. I didn't change anything important since the last successful build, but after inserting a header file, this error shows.

Steps to Reproduce

  1. Build project.

Actual Results

Build fails.

Expected Results

Based on flags, project should be build succesfully.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:frdm_k64f]
platform = freescalekinetis
board = frdm_k64f
framework = mbed
build_flags = -Wl,--wrap,main -D PIO_FRAMEWORK_MBED_RTOS_PRESENT -D PIO_FRAMEWORK_MBED_EVENTS_PRESENT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.