Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fupy/micropython
base: f48f63056994^
Choose a base ref
...
head repository: fupy/micropython
compare: afd892035dc1
Choose a head ref
  • 4 commits
  • 24 files changed
  • 2 contributors

Commits on Jan 19, 2017

  1. Take a copy of the minimal target

    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki authored and katharosada committed Jan 19, 2017
    Copy the full SHA
    f48f630 View commit details
    Browse the repository at this point in the history
  2. lm32: Basic port to the litex SoC with a lm32 CPU

    This port requires a lm32 cross compiler with libgcc enabled.
    
    I built a GCC 6.2 toolchain with newlib by doing the following:
    
      $ ls
      binutils-2.27  gcc-6.2.0  mpc-1.0.2   newlib-2.4.0.20161025
      gmp-6.1.1  mpfr-3.1.5
      $ mkdir build
      $ cd build
      $ ../gcc-6.2.0/configure  --prefix=/opt/lm32 --enable-languages=c --target=lm32-elf
      $ make
      $ mkdir /opt/lm32 && chown $USER /opt/lm32
      $ make install
    
    Then build a litex Qemu with the following:
    
      $ git clone https://github.com/shenki/qemu-litex
      $ cd qemu-litex
      $ ./configure --target-list=lm32-softmmu
      $ make
    
    To build Micropython:
    
      $ cd micropython/lm32
      $ CROSS_COMPILE=/opt/lm32/bin/lm32-elf- make deploy
    
    This produces an elf at lm32/build/firmware.elf. To run it:
    
      ./lm32-softmmu/qemu-system-lm32 -M litex -nographic -nodefaults \
       -serial stdio -kernel ~/dev/micropython/lm32/build/firmware.elf
       MicroPython v1.8.6-12-g674efbf5680a on 2016-11-20; litex with lm32
       Type "help()" for more information.
       >>>
    
    To debug it:
    
      ./lm32-softmmu/qemu-system-lm32 -M litex -nographic -nodefaults \
       -serial stdio -kernel ~/dev/micropython/lm32/build/firmware.elf \
       -S -s -monitor pty
      char device redirected to /dev/pts/12 (label compat_monitor0)
    
    This requires a lm32 GDB:
    
      $ conda/bin/lm32-elf-gdb build/firmware.elf -ex 'target remote localhost:1234'
      Reading symbols from build/firmware.elf...done.
      Remote debugging using localhost:1234
      0x40000000 in _start ()
      (gdb) c
      Continuing.
    
    You can attach to the monitor to view the lm32 registers that are not
    exposed by qemu:
    
      screen /dev/pts/12
      (qemu) QEMU 2.7.50 monitor - type 'help' for more information
      (qemu) info registers
      IN: PC=40000000
      ie=00000000 (IE=0 EIE=0 BIE=0) im=00000000 ip=00000000
      eba=00000000 deba=00000000
    
    The port currently assumes you are running on the opsis-soc, targeted
    for the minispartan6. You can adjust this by replacing the
    include/generated directories with the ones from your litex soc in both
    Qemu and Micropython.
    
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    shenki authored and katharosada committed Jan 19, 2017
    Copy the full SHA
    7f09bd1 View commit details
    Browse the repository at this point in the history
  3. Updated to use mimasv2 using headers from HDMI2USB build at commit

    cbd1e31b3a9f88e0d1ecb682b51f6d41454766de
    katharosada committed Jan 19, 2017
    Copy the full SHA
    6f7305d View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    afd8920 View commit details
    Browse the repository at this point in the history