#timvideos

/

      • Bertl_oO is now known as Bertl
      • mithro
        shenki: I think you have cut off the error there
      • shenki: Timing: Completed - 82 errors found.
      • shenki
        mithro: why did i get different results to travis?
      • mithro
        shenki: I can't see the errors, so I can't see why it is different?
      • shenki
        mithro: okay. which log file do we want? i've closed the tab so i don't have the console history
      • mithro
        shenki: a couple of pages above that output would be useful
      • shenki: as well, ISE gets confused sometimes
      • shenki
        ok, i'll rebuild
      • mithro: should i delete anything before rebuilding?
      • mithro
        shenki: no need
      • shenki
        ok
      • and this is what i want to type?
      • make BOARD=atlys TARGET=hdmi2usb PROG=openocd gateware
      • mithro
        no
      • you shouldn't need anything more than "make gateware" all the others are defaults
      • shenki
        k
      • mithro: it worked this time :/
      • mithro: thanks for your help ")
      • :)
      • mithro
        shenki: good to see you trying things :P
      • sb0 has quit
      • Bertl is now known as Bertl_zZ
      • sb0 joined the channel
      • travis-ci joined the channel
      • travis-ci
        [mithro/HDMI2USB-misoc-firmware/master#55] (480cd42): The build passed. (https://travis-ci.org/mithro/HDMI2USB-misoc-fir...)
      • travis-ci has left the channel
      • sb0_ joined the channel
      • sb0 has quit
      • sb0_ has quit
      • shenki
        mithro: thanks :) now that i've got a hdmi2usb and a hdmi2eth build, i will test it tonight
      • i want to demo the hdmi2eth to a friend
      • mithro: can you help me with a c++ question?
      • mithro: you were going on about const expressions the other day
      • sb0 joined the channel
      • mithro
        shenki: I'm around know if you still need that C++ help
      • sb0 has quit
      • sb0 joined the channel
      • shenki
        mithro: i have this snippet of code
      • static Target* const MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
      • = (sizeof(void*) == 4) ?
      • reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFF)
      • : reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFFFFFFFFFFULL);
      • it's in a header
      • and i want it to be a compile time constant
      • gcc warns me that it's unused, which i thought it wasn't supposed to do for static const things
      • (i didn't write the code. im trying to build it using a newer compiler)
      • mithro
        shenki: what C++ version are you compiling with?
      • se6astian|away is now known as se6astian
      • shenki: that expression isn't a valid const expression in older C++ versions IIRC
      • shenki: Until C++11 things you think should be constant expressions are not
      • rohitksingh joined the channel
      • shenki
        mithro: im not sure which version. let me examine the flags
      • mithro: you suspect that if i do -std=c++11 it might work?
      • mithro
        shenki: It'll be closer to working :)
      • shenki
        heh ok
      • mithro
      • tpb
        Title: Constant expressions - cppreference.com (at en.cppreference.com)
      • shenki
        mithro: the warning im getting is relating to an unused var
      • mithro: i thought i wanted to fix it by making the whole the const
      • coz normally in c++ you can have a static variable instead of doing #define?
      • mithro
        shenki: btw is the pointer const or is it pointing to something that is const, or both?
      • can you past the whole error
      • ?
      • shenki
        it should be both
      • it's not in the code as it currently exists
      • mithro
        I think you need more const in there :P
      • shenki
        yeah, that might be the issue
      • then all of the call sites blow up :/
      • but yeah, i think the issue is a long standing bug
      • and gcc 4.9 has a bug where it doesn't produce any unused warning for it
      • In file included from mdiafwd.H:34:0,
      • from mdiamba.C:30:
      • ../../../../src/include/usr/targeting/common/targetservice.H:137:22: error: ‘TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL’ defined but not used [-Werror=unused-variable]
      • static Target* const MASTER_PROCESSOR_CHIP_TARGET_SENTINEL
      • ^
      • cc1plus: all warnings being treated as errors
      • mithro
        shenki: and you sure you are using it somewhere?
      • shenki
        well, yes and no. it's a header, so sometimes it's used and sometimes it's not
      • depends on the c++ file
      • but C++ is not supposed to warn about stuff that's static const, right?
      • mithro
        shenki: I don't see why it wouldn't?
      • shenki
        $ g++ -Wall -O2 -c a.cc
      • $ echo $?
      • 0
      • $ cat a.cc
      • static const int a = 10;
      • coz c++ developers use static const instead of #defines
      • i dunno. perhaps im all confused
      • mithro
        shenki: but if you never use your #define anywhere?
      • btw you shouldn't be putting that initializer in the header file
      • shenki
        ok. why's that?
      • (i need ammo to tell the peeps who wrote it why they are wrong)
      • mithro
        shenki: it's equivalent to putting a function body in the header
      • shenki
        only if it's not const, right?
      • static char const b = 1 ? 'a' : 'b';
      • that line doesn't emit a warning
      • static char* const b = 1 ? reinterpret_cast<char* const>('a') : reinterpret_cast<char* const>('b');
      • neither does that
      • but if i change the 1 to sizeof(void *) it does warn
      • so that means that sizeof(void *) is not constant?
      • which is bullshit, the compiler should know that at compile time
      • mithro
        I think the compiler doesn't see "sizeof(void*)" as a valid constexpr
      • so it ends up actually allocating the value
      • shenki
        yeah
      • i agree
      • i proposed they use __SIZEOF_POINTER__, a builtin define that gcc provides
      • mithro
        shenki: if you look at a objdump of the output elf file, you'll see it
      • shenki
        good idea
      • mithro
        what does "sizeof(void const*)" ? or actually = "sizeof(TARGETTING::Target* const)" do?
      • Bertl_zZ is now known as Bertl
      • shenki: IE its weird to do the sizeof to a different thing you are reinterp casting from?
      • shenki
        it's a sentinel value
      • so they're trying to make a pointer whos vlaue is -1
      • ie, all 1s
      • 0xFFF....etc
      • the sizeof is to find out of a pointer should be 64 1s, or 32 1s
      • mithro
        shenki: sure - I understand that
      • shenki
        right
      • you're saying why not sizeof(Target *) ?
      • mithro
        8:16 PM <+shenki> = (sizeof(void*) == 4) ? reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFF) : reinterpret_cast<TARGETING::Target* const>(0xFFFFFFFFFFFFFFFFULL);
      • shenki
        i guess it's a pointer, it doesn't matter what type of pointer you sizeof
      • mithro
        = (AAAA == 4) ? reinterpret_cast<AAAA>(0xFFFFFFFF) : reinterpret_cast<AAAA>(0xFFFFFFFFFFFFFFFFULL);
      • Logically, all the AAAA should be the same I think
      • shenki
        yeah. that's good style
      • but sizeof(<anything> *) will always be the same value
      • so functionally there's no difference
      • it could do sizeof(int *) for all it matters
      • this code is just silly
      • i give up
      • mithro
        shenki: depends on your architecture :P - on sdcc a sizeof(int*) != sizeof(int*) depending on which memory the int* is in
      • sb0 has quit
      • Bertl is now known as Bertl_oO
      • shenki
        heh, okay
      • springermac_ joined the channel
      • mithro: got the firmware loaded onto my atlys
      • springermac has quit
      • mithro
        shenki: great, didn't we do that while I was at your place?
      • shenki
        yeah. but now ive done it by myself
      • im trying to work out how the ethernet works. it looks like there's nothing on the lm32 for it
      • mithro
        shenki: yeah, I don't know very much about it
      • shenki
        ok
      • mithro: what's our max res/framerate on usb these days?
      • mithro
        shenki: I'd start with seeing if the link light comes up / pinging it / etc
      • shenki: 720p30
      • shenki
        yeah, i get the link light
      • okay, thanks
      • mithro
        shenki: you should actually be able to set it up so that you can tftp boot the lm32 firmware
      • shenki
        mithro: i did see that. i'm poking around
      • the ip is the same range as my home network