[beagleboard] Removal of Components from BBBW for Custom PCB.

2016-11-10 Thread Brian Dohler


Hi All,


I'm making a custom BBBW for a school project. I'm adding a few peripherals 
but would like to strip down what is unnecessary in order to save on BOM 
costs. The first to go is the large HDMI chip. It looks like there's a few 
small components which support it. I just want to be sure that i can remove 
them without causes issues for the Linux OS. 





I'm in particular interested in the components above. OSC1 outputs to 
GPIO3_21, which is used in the Cape header. I'm curious if the OSD3358 ever 
uses this clock as an input, however, or whether it's just to save space in 
the headers.

Thanks in advance,
Brian Dohler

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ef847373-3571-4ff3-ae66-317d61eed0ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Flashing a BBB's EMC from uSD Card - problems

2016-11-10 Thread 'Ian Watts' via BeagleBoard
Thanks Stephane. Going to look at that now...

In case this helps, I documented how I got started a little while ago.  You 
> can find my ramblings here:  
> https://www.ccoderun.ca/programming/2015-06-07_BeagleBoneBlack/index.html
>

Appreciated. I'll revert with my findings. 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9943210e-e709-4b01-927a-6d67351d6638%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Flashing a BBB's EMC from uSD Card - problems

2016-11-10 Thread 'Ian Watts' via BeagleBoard


On Thursday, 10 November 2016 14:28:18 UTC+1, Dennis Lee Bieber wrote:
>
> On Wed, 9 Nov 2016 15:16:44 -0800 (PST), "'Ian Watts' via BeagleBoard" 
>  declaimed the 
> following: 
>
> > 
> >I have a BBB running a 2014 Linux Distro (the one the BBB came with). 
>
> First question: what variation of the BBB... As I recall, only the 
> rev 
> C have a 4GB eMMC; older BBBs can't be flashed with the full 4GB releases, 
> you have to use a 2GB reduced OS for flashing. 
>
> >So, what I THINK I have to do is modify the uEnv.txt file (on my BBB, 
> this 
> >is found in the /Boot/uBoot directory) by removing the "#" at the 
> beginning 
> >of the line cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh. 
> >To be fair my uEnv.txt file doesn't have this line so I copied and pasted 
> >it as the last line of the file. I used 'nano' from within Terminal to 
> >accomplish this... Unfortunately, rebooting the BBB did not result in an 
>
> You have to edit the line in the copy of uEnv.txt ON THE SD CARD, 
> not 
> the one on the eMMC... Which essentially means booting with the SD card, 
> THEN editing the file, followed by rebooting. 
>
> Note that once you've edited that file on the card, the card will 
> always start a flash operation when used for booting (you might be able to 
> install/mount it after booting off the eMMC and editing the card's 
> uEnv.txt 
> again to disable flashing, though it may be easier to just use the 
> computer 
> to reimage the card). 
>
> Second note: once you succeed, you may find you don't have to use 
> the 
> boot select button -- the newer images seem to be rigged so that if the SD 
> card is installed at boot time, they make the card the file system root 
> for 
> the rest of the boot process. 
>
> -- 
> Wulfraed Dennis Lee Bieber AF6VN 
> wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/ 
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f3d3de44-73bd-4577-8be1-07c68d7fdaa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Do I really need a USB-to-FTDI cable to see the U-boot prompt? Will it not work on micro-HDMI?

2016-11-10 Thread William Hermans
You do not have to buy a FTDI cable. It could be any decent cable, that
does not necessarily cost as much as FTDI. For example my buddy and I
ordered a couple of PL2303HX cables off ebay for like $5-6 usd shipped.

My point here is that you could just simply pay $2-$3 out of your pocket,
and just be done with it. However, depending on who you deal with shipping
can take a long time . . .

On Thu, Nov 10, 2016 at 1:17 PM, Robert Nelson 
wrote:

> On Thu, Nov 10, 2016 at 10:33 AM,   wrote:
> > Hi, I've seen some docs on how to build a custom kernel and so far it
> > appears to have cross-compiled correctly.
> > http://elinux.org/Building_BBB_Kernel
> > http://elinux.org/Beagleboard:BeagleBone_Black_Serial
> >
> > Now, in order to see the U-boot prompt, it says I should connect the
> serial
> > cable to my PC. I currently don't have a FTDI cable and buying one is
> going
> > to be a slow, bureaucratic process (company policies, employment status
> as a
> > contractor, blah blah blah). I was wondering if it is really needed - I
> have
> > a micro-HDMI and a USB keyboard, I can access the Linux console with
> them.
> > Can they be used to access the U-boot prompt and command line?
>
> Serial only...
>
> > (Sorry if it sounds like a dumb question but I'd never heard of U-boot
> > before. I've worked with other similar devices but they had an Intel
> > processor and chipset, was able to access EFI and GRUB via HDMI).
> >
> > The BBB also had a mini-USB cable included. By plugging it to my PC with
> it
> > I can see the BBB as a storage device and it shows up the first
> partition of
> > eMMC (docs, drivers, etc). But it doesn't appear to expose a serial port
> and
> > so I don't think I can use it to see the boot prompt...is that correct?
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/CAOCHtYjTTu6XBt%2B1ujbdvYzKfN93NBoT7GxOKCtYJpP
> hnYqU4w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORqS%3DiFok972hp-KZhBWfYmYo38G2Wke5n7vZnTEq2aHPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Do I really need a USB-to-FTDI cable to see the U-boot prompt? Will it not work on micro-HDMI?

2016-11-10 Thread Robert Nelson
On Thu, Nov 10, 2016 at 10:33 AM,   wrote:
> Hi, I've seen some docs on how to build a custom kernel and so far it
> appears to have cross-compiled correctly.
> http://elinux.org/Building_BBB_Kernel
> http://elinux.org/Beagleboard:BeagleBone_Black_Serial
>
> Now, in order to see the U-boot prompt, it says I should connect the serial
> cable to my PC. I currently don't have a FTDI cable and buying one is going
> to be a slow, bureaucratic process (company policies, employment status as a
> contractor, blah blah blah). I was wondering if it is really needed - I have
> a micro-HDMI and a USB keyboard, I can access the Linux console with them.
> Can they be used to access the U-boot prompt and command line?

Serial only...

> (Sorry if it sounds like a dumb question but I'd never heard of U-boot
> before. I've worked with other similar devices but they had an Intel
> processor and chipset, was able to access EFI and GRUB via HDMI).
>
> The BBB also had a mini-USB cable included. By plugging it to my PC with it
> I can see the BBB as a storage device and it shows up the first partition of
> eMMC (docs, drivers, etc). But it doesn't appear to expose a serial port and
> so I don't think I can use it to see the boot prompt...is that correct?

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYjTTu6XBt%2B1ujbdvYzKfN93NBoT7GxOKCtYJpPhnYqU4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Do I really need a USB-to-FTDI cable to see the U-boot prompt? Will it not work on micro-HDMI?

2016-11-10 Thread unixero
Hi, I've seen some docs on how to build a custom kernel and so far it 
appears to have cross-compiled correctly.
http://elinux.org/Building_BBB_Kernel
http://elinux.org/Beagleboard:BeagleBone_Black_Serial

Now, in order to see the U-boot prompt, it says I should connect the serial 
cable to my PC. I currently don't have a FTDI cable and buying one is going 
to be a slow, bureaucratic process (company policies, employment status as 
a contractor, blah blah blah). I was wondering if it is really needed - I 
have a micro-HDMI and a USB keyboard, I can access the Linux console with 
them. Can they be used to access the U-boot prompt and command line?

(Sorry if it sounds like a dumb question but I'd never heard of U-boot 
before. I've worked with other similar devices but they had an Intel 
processor and chipset, was able to access EFI and GRUB via HDMI).

The BBB also had a mini-USB cable included. By plugging it to my PC with it 
I can see the BBB as a storage device and it shows up the first partition 
of eMMC (docs, drivers, etc). But it doesn't appear to expose a serial port 
and so I don't think I can use it to see the boot prompt...is that correct?

Thanks.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3a7e408e-2533-41a9-892b-cd4b7fe66c6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Flashing a BBB's EMC from uSD Card - problems

2016-11-10 Thread Stephane Charette

>
> I have spent hours Googling and trying just about everything I can think 
> of to re-falsh my BBB with Debian 8.4 (Jessie 2016-05-13) with no luck.
>

In case this helps, I documented how I got started a little while ago.  You 
can find my ramblings here: 
 https://www.ccoderun.ca/programming/2015-06-07_BeagleBoneBlack/index.html

Stéphane

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d561f70c-34e7-46f5-83b0-3281c9533dea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] live image for BBB ?

2016-11-10 Thread S

Anyone know if exist a Debian Live image for BBB, bootable from uSD card?

I need a system that can boot without modifying any files on the uSD 
card, because I need the operating system to be verifiable, via SHA sum, 
for example, and therefore must be immutable.


Debian have scripts to build a live image, but I don't know if it works 
on BBB.



Thanks in advance,


Vinicius

--
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e1181bb6-ac5b-00a6-b1a5-d49e16f87167%40uol.com.br.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Embedded C - Function Declaration

2016-11-10 Thread Przemek Klosowski
On Thu, Nov 10, 2016 at 2:14 AM, Neil Jubinville
 wrote:

> Calling the write function from the main loop results in the LED turning on
> however the function does not fire.
>
> static void turnOn(){
>write_r30(0x);
> }
>
>
> static void turnOn(){
>write_r30(0x);
> }
>
>
> int main(void){
>
>turnOn();   // this does not work.
>

I think it's a simple typo---you have two turnOn() functions---it
looks to me that the second one should be called turnOff(). As it is,
I think you redefine the first turnOn with the second one, which
actually turns off the pin, so you see nothing. Does it make sense?

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAC%3D1GgEti53XjubcJ880hZ2OK32-5OVZzUpR%3DoMAqSbTwFh7Gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Beaglebone Black PRU Troubles

2016-11-10 Thread Greg
Once you get everything solid, please take a look at dmesg after boot.
I'm curious to see if you get successful PRU firmware start-up.

Greg

On Thursday, November 10, 2016 at 8:28:23 AM UTC-5, Zach B wrote:
>
> Hey everyone, I wanted to give an update. I got the remote_proc to turn on 
> last night. It was as simple as updating my repo like Robert had mentioned. 
> I also made the correction that Brett mentioned about the pins. There is 
> still something wrong in my device overlay file that is causing an "invalid 
> arguement" error but I am going to try and sort that out tonight. I'll post 
> again with the corrected version once I get it working and can use the PRU.
>
> Thanks again for your help.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a9789324-586c-4be8-be6c-1cbad96f4b3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Beaglebone Black PRU Troubles

2016-11-10 Thread Zach B
Hey everyone, I wanted to give an update. I got the remote_proc to turn on 
last night. It was as simple as updating my repo like Robert had mentioned. 
I also made the correction that Brett mentioned about the pins. There is 
still something wrong in my device overlay file that is causing an "invalid 
arguement" error but I am going to try and sort that out tonight. I'll post 
again with the corrected version once I get it working and can use the PRU.

Thanks again for your help.

On Wednesday, November 9, 2016 at 1:15:13 PM UTC-5, Brett Hamilton wrote:
>
> I think your device tree overlay is not quite right, I see P8.11 set as 
> mode 6 with internal pull down, but you've set exclusive use on P8.12.
>
> I usually use 
> http://kilobaser.com/blog/2014-07-28-beaglebone-black-devicetreeoverlay-generator
>  
> to look up pinmux settings because it's easier and less error prone than 
> doing it manually.
>
> For reference because it's not especially easy to find, the pinmux 
> register bits are defined in the AM335x TRM section 9.2.2, page 1356. My 
> version is dated Feb. 2015, TI doc # SPRUH73L.
>
> On Tuesday, November 8, 2016 at 11:42:25 AM UTC-5, Zach B wrote:
>>
>> I have spent a solid 12 hours trying to get the PRU's on the beaglebone 
>> to work. So far I seem to be completely stuck at the getting the device 
>> overlay to work as well as enabling the remoteproc. I have tried to piece 
>> together all of the information I have found on the internet but it is 
>> either out of date or extremely fragmented. I can't seem to find a current 
>> working example or I hit a wall when following along as said previously.
>>
>> Setup/Environment
>> I have updated the kernel on the beaglebone followed by multiple 
>> "updates", "upgrades" and "dist-upgrades". As far as I can tell I am using 
>> the most recent version of everything.
>>
>>- Beaglebone Black
>>- Debian 8.6
>>- kernel 4.4.30-ti-r64
>>- dtc 1.4.1
>>
>> Sample Code
>> Device Overlay File [PRU-GPIO-BLINK-00A0.dts]:
>> 
>> // Setup file for basic PRU GPIO Blinking LED
>> 
>> /dts-v1/;
>> /plugin/;
>> 
>> / {
>> compatible = "ti,beaglebone", "ti,beaglebone-black";
>> 
>> part-number = "PRU-GPIO-BLINK";
>> version = "00A0";
>> 
>> // This overlay uses the following resources
>> exclusive-use = "P8.12";
>> 
>> fragment@0 {
>> target = <_pinmux>;
>> __overlay__ {
>> 
>> gpio_pins: pinmux_gpio_pins {
>> pinctrl-single,pins = <
>> 0x034   0x06
>> >;
>> };
>> };
>> };
>> 
>> fragment@1 {
>> target = <>;
>> __overlay__ {
>> status = "okay";
>> pinctrl-names = "default";
>> pinctrl-0 = <_pins>;
>> };
>> };
>> };
>>
>>
>>
>> The above code compiles using:  
>> root@beaglebone:/lib/firmware# dtc -O dts -o 
>> /lib/firmware/PRU-GPIO-BLINK-00A0.dtbo -b 0 -@ PRU-GPIO-BLINK.dts
>>
>> When I go to add this to the bone_capemgr using:
>> root@beaglebone:/lib/firmware# echo "PRU-GPIO-BLINK" > 
>> /sys/devices/platform/bone_capemgr/slots
>>
>> I end up getting either a "No Such File or Directory" error or a "File 
>> Exists" error. I have disabled the HDMI in uEnvt.txt like many people have 
>> recommended by simply uncommenting the line:
>>
>> dtb=am335x-boneblack-emmc-overlay.dtb
>>
>> On top of the above I tried following the exercise here: 
>> http://elinux.org/EBC_Exercise_30_PRU_via_remoteproc_and_RPMsg  
>> I make it through most of that exercise, up until I hit the enabling the 
>> remoteproc portion. When I go to "uncomment" 
>> #include "am33xx-pruss-rproc.dtsi
>> I can't seem to find it anywhere in the file. When I simply add the line 
>> to the file and try calling `make` the compiler complains that it can't 
>> find the file and fails the build.  
>>
>> If anyone is curious here is the output when I run 
>> cat /sys/devices/platform/bone_capemgr/slots
>>
>>  0: PF  -1
>>  1: PF  -1
>>  2: PF  -1
>>  3: PF  -1
>>  4: P-O-L-   0 Override Board Name,00A0,Override Manuf,univ-emmc
>>
>> Question  
>> Does anyone have any suggestions as to why my device overlay is not 
>> working and I can't follow along with the exercise on elinux? I am pretty 
>> much stuck at this point and most of the examples online reference out of 
>> date pathing or approaches. Is there a package that I am missing? From what 
>> I have read it seems like all of the compilers and loaders come built into 
>> the new beaglebone distributions now. If anyone needs clarification or I 
>> forgot to mention something I will 

[beagleboard] LEDs in BBB

2016-11-10 Thread madhuri depuru
Hello,
I am newbie in Linux programming with BBB. I tried to upload a new program 
into BBB using WinSCP software where BBB has already some exisiting program 
in it.I erased it and uploaded the program..the program is getting updated 
in BBB but its not working. EMMC LED present on BBB which is supposed to 
blink while BBB is working is not blinking at all..can anyone please help 
me in uploading a program to BBB.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f760923c-a3e2-4cb8-b2f2-00941a82a963%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] BeagleBone X15?

2016-11-10 Thread Paul Plankton
No, it is not a typo: but how about a BeagleBone with this new, dual-core 
processor?

I know, die to it's size it never could have that much peripherals like the 
BeagleBoard X15, but having the current interfaces plus this processor 
should not only bring more computing power but also a better price 
(comparing to BeagleBoard X15).

Just as an idea...

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/0a3acc07-71dd-4469-a4e2-e33d8867015b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: BBB OS Development suggested resources

2016-11-10 Thread Paul Plankton
I'd recommend to use StarterWare which comes with all required definitions 
and a bunch of example codes (including the blinking LED). StarterWare is 
available for free at TI's pages or as a (fully compatible) 
community-variant which comes with a lot of bug fixes the original version 
never got: https://sourceforge.net/projects/starterwarefree/

Beside of that the AM335x TRM will be your best friend.


Am Dienstag, 1. November 2016 07:05:04 UTC+1 schrieb cwl...@mst.edu:
>
> I am interested in OS Development as a hobby.
>
> I started off with a Raspberry Pi 2B, but soon found the BCM2836 
> documentation lacking. The TI Sitara used in the BBB looks much better in 
> this regard.
>
> The setup I have planned is to boot my OS off eMMC and use Linux on an SD 
> Card to do the development work. My immediate goal before writing any OS 
> features is to boot a stub that can blink some lights and echo a message 
> sent over the serial line, which will be the main way to interact with the 
> OS for now.
>
> Naturally, I have a few questions, and any help anyone could give would be 
> much appreciated:
>
> 1. Has anyone done this before? Good example code or a reliable point of 
> contact for questions would be best.
> 2. Besides the manuals for the hardware and BBB schematics, are there any 
> resources that would be helpful?
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/e775753c-034a-4379-8190-b61a6b402151%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Embedded C - Function Declaration

2016-11-10 Thread Chris Green
Neil Jubinville  wrote:
> [-- multipart/alternative, encoding 7bit, 132 lines --]
> 
> [-- text/plain, encoding 7bit, charset: UTF-8, 46 lines --]
> 
> Hi All, so now that I am underway with the loader working I decided I would 
> abstract out the single command that turns on the LED to a function.  I 
> have been hanging out in high level languages for far too long and it shows!
> 
> I am observing that my function is not being called??  
> 
> Calling the write function from the main loop results in the LED turning on 
> however the function does not fire.
> 
> I would have expected that a forward declaration would work fine and no 
> additional header references would be required.Is there anything 
> special needed to declare a simple function in a PRU-GCC compiled c file?
> 
> 
> static void turnOn(){
>write_r30(0x);
> }
> 
> 
> static void turnOn(){
>write_r30(0x);
> }
> 
> 
> int main(void){
>  
>turnOn();   // this does not work.
> 
>// write_r30(0x);   This works.
> 
> return 0;
> 
> 
> }
> 

When you say "this does not work" what error (compiler error
presumably) do you see?  ... and is the code *exactly* as above?


-- 
Chris Green
·

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/smqdfd-sk4.ln1%40esprimo.zbmc.eu.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Embedded C - Function Declaration

2016-11-10 Thread William Hermans
Additionally, it's not clear which version of gcc the pru_gcc compiler is
based on. So, it's not readily obvious as to which C std we're using.
Anyway, in C technically you can not override a function as can be done in
many high level languages such as C++, C#, etc. There are ways to work
around this feature, but it depends on which std as to which options you
have,

On Thu, Nov 10, 2016 at 1:46 AM, William Hermans  wrote:

> *#1 Your code as is won't compile. Period.*
> william@beaglebone:~$ pru-gcc -o main main.c
> main.c:10:13: error: redefinition of 'turnOn'
>  static void turnOn(){
>  ^~
> main.c:5:13: note: previous definition of 'turnOn' was here
>  static void turnOn(){
>  ^~
> *#2 If you use the -Wall compiler option, you'll be given more information
> as to why.*
> william@beaglebone:~$ pru-gcc -Wall -o main main.c
> main.c:10:13: error: redefinition of 'turnOn'
>  static void turnOn(){
>  ^~
> main.c:5:13: note: previous definition of 'turnOn' was here
>  static void turnOn(){
>  ^~
> *main.c:5:13: warning: 'turnOn' defined but not used [-Wunused-function]*
>
> *#3 If you only have one function of the same name.*
> william@beaglebone:~$ pru-gcc -Wall -o main main.c
> william@beaglebone:~$ ls |grep main
> main
> main.c
>
> *#4 I suspect you're not showing all your code. So for anyone to give a
> proper answer you need to provide _all_your_code_*
>
>
>
>
> On Thu, Nov 10, 2016 at 12:14 AM, Neil Jubinville  > wrote:
>
>> Hi All, so now that I am underway with the loader working I decided I
>> would abstract out the single command that turns on the LED to a function.
>> I have been hanging out in high level languages for far too long and it
>> shows!
>>
>> I am observing that my function is not being called??
>>
>> Calling the write function from the main loop results in the LED turning
>> on however the function does not fire.
>>
>> I would have expected that a forward declaration would work fine and no
>> additional header references would be required.Is there anything
>> special needed to declare a simple function in a PRU-GCC compiled c file?
>>
>>
>> static void turnOn(){
>>write_r30(0x);
>> }
>>
>>
>> static void turnOn(){
>>write_r30(0x);
>> }
>>
>>
>> int main(void){
>>
>>turnOn();   // this does not work.
>>
>>// write_r30(0x);   This works.
>>
>> return 0;
>>
>>
>> }
>>
>>
>>
>>
>> --
>> For more options, visit http://beagleboard.org/discuss
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beagleboard+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/beagleboard/2b564886-2f54-4ffe-a147-130e863d91a2%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORod2zagHj%3D7ONtAFypyouQLXCW%2BjxZPEt4iFu2i0ASa%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Embedded C - Function Declaration

2016-11-10 Thread William Hermans
*#1 Your code as is won't compile. Period.*
william@beaglebone:~$ pru-gcc -o main main.c
main.c:10:13: error: redefinition of 'turnOn'
 static void turnOn(){
 ^~
main.c:5:13: note: previous definition of 'turnOn' was here
 static void turnOn(){
 ^~
*#2 If you use the -Wall compiler option, you'll be given more information
as to why.*
william@beaglebone:~$ pru-gcc -Wall -o main main.c
main.c:10:13: error: redefinition of 'turnOn'
 static void turnOn(){
 ^~
main.c:5:13: note: previous definition of 'turnOn' was here
 static void turnOn(){
 ^~
*main.c:5:13: warning: 'turnOn' defined but not used [-Wunused-function]*

*#3 If you only have one function of the same name.*
william@beaglebone:~$ pru-gcc -Wall -o main main.c
william@beaglebone:~$ ls |grep main
main
main.c

*#4 I suspect you're not showing all your code. So for anyone to give a
proper answer you need to provide _all_your_code_*




On Thu, Nov 10, 2016 at 12:14 AM, Neil Jubinville 
wrote:

> Hi All, so now that I am underway with the loader working I decided I
> would abstract out the single command that turns on the LED to a function.
> I have been hanging out in high level languages for far too long and it
> shows!
>
> I am observing that my function is not being called??
>
> Calling the write function from the main loop results in the LED turning
> on however the function does not fire.
>
> I would have expected that a forward declaration would work fine and no
> additional header references would be required.Is there anything
> special needed to declare a simple function in a PRU-GCC compiled c file?
>
>
> static void turnOn(){
>write_r30(0x);
> }
>
>
> static void turnOn(){
>write_r30(0x);
> }
>
>
> int main(void){
>
>turnOn();   // this does not work.
>
>// write_r30(0x);   This works.
>
> return 0;
>
>
> }
>
>
>
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/2b564886-2f54-4ffe-a147-130e863d91a2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORogdBK8OGGqeY5633%2BqwSrBN9Vtv32OHuYr%2BTGZmtqAVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.