RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Sep 22, 2020 1:34 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Coustem kcongif file
PostPosted: Fri Feb 05, 2016 5:27 pm 

Joined: Wed Sep 09, 2015 3:46 pm
Posts: 6
Dear All
i have design a pic32mx79f512l board for getting some acquisition data.now i want to run the retrobsd os on my board but my connection of memory card on spi1 and used uart2 for max232 now i want to make these configuration changes in the retrobsd k config file to run the os i have the following question
Which compiler is used for changing in k config file and how to generate the kernel file and sd image for my custom board.
if some one want i well send the complete detail of my hardward connection of memory card and uarts.
Please help me i my waiting for an urgent response because i have a demo of my project in next coupal of week.

Regards
Fahim Haider


Top
 Profile  
 
 Post subject: Re: Coustem kcongif file
PostPosted: Fri Feb 05, 2016 6:02 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
You have to use baremetal profile at /retrobsd/sys/pic32/baremetal

What is your Crystal frequency? Where are your LEDs connected to? Do you have a button on a pin? What is your Sdcard's card select pin?

devcfg.c
Code:
/*
 * Chip configuration, 8MHz crystal, 80MHZ clock, No USB
 */
#include "machine/pic32mx.h"

PIC32_DEVCFG (
    DEVCFG0_DEBUG_DISABLED,     /* ICE debugger enabled */

    DEVCFG1_FNOSC_PRIPLL  |      /* HS crystal oscillator with PLL */
    DEVCFG1_POSCMOD_HS |      /* crystal HS for example 8MHz */

    DEVCFG1_OSCIOFNC |          /* CLKO output active */
    DEVCFG1_FPBDIV_1 |          /* Peripheral bus clock = SYSCLK/1 */
    DEVCFG1_FCKM_DISABLE |      /* Fail-safe clock monitor disable */
    DEVCFG1_FCKS_DISABLE |      /* Clock switching disable */
    DEVCFG1_WDTPS_1024,         /* Watchdog postscale = 1/1024 */

    DEVCFG2_FPLLIDIV_2 |        /* PLL divider = 1/2 */
    DEVCFG2_FPLLMUL_20 |        /* PLL multiplier = 20x */
    DEVCFG2_UPLLIDIV_2 |        /* USB PLL divider = 1/2 */
    DEVCFG2_UPLLDIS |           /* Disable USB PLL */
    DEVCFG2_FPLLODIV_1,         /* PLL postscaler = 1/1 */

    DEVCFG3_USERID(0xffff) |    /* User-defined ID */
    DEVCFG3_FSRSSEL_7 |         /* Assign irq priority 7 to shadow set */
    DEVCFG3_FETHIO);            /* Default Ethernet i/o pins */


and Config
Code:
#
# Custom board with UART console
# ==============================
# Console on UART2
# No USB
# SDCARD on SD1
#
# To build the kernel, use:
#   cd sys/pic32/baremetal
#   kconfig Config
#   make clean
#   make
#
# Format of this file is described on page:
# http://retrobsd.org/wiki/doku.php/doc/kconfig
#
#
architecture    "pic32"
cpu             "PIC32MX7"                  # Processor variant
board           "BAREMETAL"                 # Board type
ldscript        "baremetal/script.ld"       # Linker script

# Standard system options
options         "CPU_KHZ=80000"             # Oscillator frequency of CPU core
options         "BUS_KHZ=80000"             # Frequency of peripheral bus
options         "BUS_DIV=1"                 # Bus clock divisor 1/2/4/8
options    "NPROC=25"      
options    "HZ=100"
options    "NBUF=8"

# LEDs
signal          "LED_KERNEL"    pin RD3     # kernel activity indicator
signal          "LED_DISK"      pin RD2     # disk activity indicator
signal          "LED_TTY"       pin RD12    # tty activity indicator
signal          "LED_SWAP"      pin RA3     # swap activity indicator

# Root filesystem at /dev/sd0a, swap at /dev/sd0b
config          unix    root on sd0a
                        swap on sd0b

# Serial UART ports
device          uart2
options      "UART_BAUD=115200"

# Console options
options         "CONS_MAJOR=UART_MAJOR"     # UART device
options         "CONS_MINOR=1"              # /dev/tty1

# Button
# Hold this button pressed at startup to enter single-user mode.
#signal          "BUTTON1"   pin RE7 invert  # PRG button, active low

# SPI ports
controller      spi1                        # SD card

# SD card
device          sd0     at spi1 pin RD1     # Sdcard's select pin
options         "SD_MHZ=13"                 # speed 13 MHz

# General purpose I/O ports
# Flags define a mask of available pins
# The following pins excluded:
#   RG6, RG7, RG8, RG9 - spi2, SD card
#   RD1, RD2, RD3      - spi3
#   RF4, RF5           - uart2
device          gpio1   flags 0xffff    # port B
device          gpio2   flags 0xf000    # port C
device          gpio3   flags 0x0ff1    # port D
device          gpio4   flags 0x00ff    # port E
device          gpio5   flags 0x000b    # port F
device          gpio6   flags 0x000c    # port G

# ADC driver
device          adc

# PWM driver
device          pwm

You have to edit the above pin assignments and gpiox flags according to your hw wiring..

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: Coustem kcongif file
PostPosted: Fri Feb 05, 2016 6:50 pm 

Joined: Wed Sep 09, 2015 3:46 pm
Posts: 6
hey how could i edit the configuration file.Please tell me the procedure by using a compiler or some thing else please tell me step by step.
Below are the hardware detail
i m using the 8Mhz external oscillator.
5 led on port E
sdi 1 sdo 1 sck 1 for memory card
uart 1 for rs232 output
5 push button on port A


Top
 Profile  
 
 Post subject: Re: Coustem kcongif file
PostPosted: Sat Feb 06, 2016 12:17 pm 

Joined: Wed Sep 09, 2015 3:46 pm
Posts: 6
Please help me
i am using Ubuntu 14.04 lte
i got the clone of retrobsd from github now what should i do for compiling the retrobsd code
plz help me


Top
 Profile  
 
 Post subject: Re: Coustem kcongif file
PostPosted: Sat Feb 06, 2016 1:03 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
wiki/doku.php/doc/install

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission