Mbed forum

Getting started with yotta

yotta

(Austin Blackstone) #42

Try using the yotta windows installer: https://www.youtube.com/watch?v=4fqiHUyyXvU

To check if the compiler is in your path you should just be able to type arm-none-eabi-gcc --help into your compiler and get output that looks like this:

Note that you may need to restart your computer after adding to your system or user path for the changes to take effect.

>arm-none-eabi-gcc --help
Usage: arm-none-eabi-gcc [options] file...
Options:
  -pass-exit-codes         Exit with highest error code from a phase
  --help                   Display this information
  --target-help            Display target specific command line options
  --help={common|optimizers|params|target|warnings|[^]{joined|separate|undocumented}}[,...]
                           Display specific types of command line options
  (Use '-v --help' to display command line options of sub-processes)
  --version                Display compiler version information
  -dumpspecs               Display all of the built in spec strings
  -dumpversion             Display the version of the compiler
  -dumpmachine             Display the compiler's target processor
  -print-search-dirs       Display the directories in the compiler's search path
  -print-libgcc-file-name  Display the name of the compiler's companion library
  -print-file-name=<lib>   Display the full path to library <lib>
  -print-prog-name=<prog>  Display the full path to compiler component <prog>
  -print-multiarch         Display the target's normalized GNU triplet, used as
                           a component in the library path
  -print-multi-directory   Display the root directory for versions of libgcc
  -print-multi-lib         Display the mapping between command line options and
                           multiple library search directories
  -print-multi-os-directory Display the relative path to OS libraries
  -print-sysroot           Display the target libraries directory
  -print-sysroot-headers-suffix Display the sysroot suffix used to find headers
  -Wa,<options>            Pass comma-separated <options> on to the assembler
  -Wp,<options>            Pass comma-separated <options> on to the preprocessor
  -Wl,<options>            Pass comma-separated <options> on to the linker
  -Xassembler <arg>        Pass <arg> on to the assembler
  -Xpreprocessor <arg>     Pass <arg> on to the preprocessor
  -Xlinker <arg>           Pass <arg> on to the linker
  -save-temps              Do not delete intermediate files
  -save-temps=<arg>        Do not delete intermediate files
  -no-canonical-prefixes   Do not canonicalize paths when building relative
                           prefixes to other gcc components
  -pipe                    Use pipes rather than intermediate files
  -time                    Time the execution of each subprocess
  -specs=<file>            Override built-in specs with the contents of <file>
  -std=<standard>          Assume that the input sources are for <standard>
  --sysroot=<directory>    Use <directory> as the root directory for headers
                           and libraries
  -B <directory>           Add <directory> to the compiler's search paths
  -v                       Display the programs invoked by the compiler
  -###                     Like -v but options quoted and commands not executed
  -E                       Preprocess only; do not compile, assemble or link
  -S                       Compile only; do not assemble or link
  -c                       Compile and assemble, but do not link
  -o <file>                Place the output into <file>
  -pie                     Create a position independent executable
  -shared                  Create a shared library
  -x <language>            Specify the language of the following input files
                           Permissible languages include: c c++ assembler none
                           'none' means revert to the default behavior of
                           guessing the language based on the file's extension

Options starting with -g, -f, -m, -O, -W, or --param are automatically
 passed on to the various sub-processes invoked by arm-none-eabi-gcc.  In order to pass
 other options on to these processes the -W<letter> options must be used.

For bug reporting instructions, please see:
<http://gcc.gnu.org/bugs.html>.

(Bl Na) #43

Hello to all, I tried to familiarize myself with mbed os a bit, so I followed the blinky tutorial https://docs.mbed.com/docs/getting-started-mbed-os/en/latest/FirstProjectmbedOS/.
When I try to set the target (yotta target frdm-k64f-gcc) i get:
Fatal Exception, yotta=0.14.2
Traceback (most recent call last):....
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 18: ordinal not in range(128)
Does anybody know what could be the issue?
thanks for the answer


(James Crosby) #44

It looks like you might need to set PYTHONIOENCODING="utf-8" or a similar encoding in your shell. (Are you piping the output of yotta to another process, perhaps?)


(Bl Na) #45

No, I'm not piping the output anywhere. Could you tell me where I can set the right encoding? (I'm using yotta on windows)

(workspace) C:\yotta\projects>yt target frdm-k64f-armcc
info: get versions for frdm-k64f-armcc
info: download frdm-k64f-armcc@2.0.0 from the public module registry
Fatal Exception, yotta=0.14.2
Traceback (most recent call last):
  File "C:\yotta\python\Lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\yotta\python\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\yotta\workspace\Scripts\yt.exe\__main__.py", line 9, in <module>
  File "c:\yotta\workspace\lib\site-packages\yotta\main.py", line 201, in main
    status = args.command(args, following_args)
  File "c:\yotta\workspace\lib\site-packages\yotta\target.py", line 132, in exec
Command
    target, errors = c.satisfyTarget(t)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\component.py", line 677,
in satisfyTarget
    shrinkwrap = self.getShrinkwrap()
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\target.py", line 164, in
getDerivedTarget
    inherit_shrinkwrap = shrinkwrap
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\access.py", line 381, in
satisfyVersion
    name, version_required, working_directory, type=type, inherit_shrinkwrap = i
nherit_shrinkwrap
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\access.py", line 317, in
satisfyVersionByInstalling
    name, version_required, install_into, v, type=type, inherit_shrinkwrap = inh
erit_shrinkwrap
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\access.py", line 328, in
_satisfyVersionByInstallingVersion
    version.unpackInto(working_directory)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\registry_access.py", line
 447, in unpackInto
    _getTarball(self.url, directory, self.sha256)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\registry_access.py", line
 100, in wrapped
    return fn(*args, **kwargs)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\registry_access.py", line
 185, in wrapped
    return fn(*args, **kwargs)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\registry_access.py", line
 168, in wrapped
    return fn(*args, **kwargs)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\registry_access.py", line
 149, in wrapped
    return fn(*args, **kwargs)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\registry_access.py", line
 273, in _getTarball
    access_common.unpackFromCache(sha256, directory)
  File "c:\yotta\workspace\lib\site-packages\yotta\lib\access_common.py", line 2
07, in unpackFromCache
    path = os.path.join(cache_dir, cache_key)
  File "c:\yotta\workspace\lib\ntpath.py", line 85, in join
    result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 10: ordinal
 not in range(128)

(James Crosby) #46

You can set it using the set command in your terminal, or in the system-wide environment variables.

From your full backtrace it looks like this issue is related to unicode in one of the paths being manipulated (specifically the path for the cache), possibly because your username has unicode characters in it? Unfortunately the root source of this failure appears to be this bug in python http://bugs.python.org/issue13207, which isn't going to be fixed in python 2.7

I'm checking if there's anything we can do to workaround this issue.


(James Crosby) #47

Should be fixed by this PR against yotta: https://github.com/ARMmbed/yotta/pull/748


(Bl Na) #48

I dont have unicode characters in my username, but above changes solve the problem indeed. Thank you


(James Crosby) #49

OK, well that's good to hear anyway. yotta 0.15.1 has been released now which includes this fix :smile:


(Nicolas COMTE) #50

Hi @rosterloh84 do you have a link to the target you posted ? How to use it ? Just perform a yotta target ?
I'm compiling actually for F401RE and pushing the code on the F411RE but it does not works everytime ^^


(Randal Ford) #51

Completely new at this. Getting error on build.

I am trying to follow the instructions at Docs »Getting Started »Blinky - your first application
https://docs.mbed.com/docs/getting-started-mbed-os/en/latest/FirstProjectmbedOS/
Getting an error on Step 5: build:
CMake Error... include could not find load file: /get_configuration.cmake
Prior to that everything went well. Using a FRDM-K22F board.
Am I missing a step?


(Jan Jongboom) #52

Very late reply, but this answer seems to indicate K22F target is not officially supported on mbed OS, only mbed Classic.

The weird thing is that the target seems available in public yotta, but trying to build for frdm-k22f-gcc also fails quickly for me... So for now I'd keep using Classic.